So it turns out this post was unnecessary. I discovered that I can get the form to expand if the popup is the only Gravity form on the page. I was trying to use the javascript on a page with two Gravity forms and one conflicted with the other one. Once i moved it to its own page, it worked perfectly.