My form's length is much larger when embedded; even changing the length in iFrame has no affect

  • Profile Image
    plusco
    Asked on February 18, 2014 at 11:49 PM

    My form's length is much larger when embedded; even changing the length in iFrame has no affect. Lightbox is a work around, but it still is much larger in length than it needs to be. 

     

    The iFrame code below.  style="width:100%; height:4354px.  The actual width is 700, which I changed because too narrow when width is at 100%.  The height is 2300px.  Which only has the effect of changing the height to 4008px.  Can someone help me with this?  

     

    Code below was generated and no changes have been made.  The URL code width was changed so it would be visable to width:700px; height has not been changed @ height:4354px 

     

    Thanks, Phillip.

     

     

     <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.us/form/40488946387169" frameborder="0" style="width:100%; height:4354px; border:none;" scrolling="no"></iframe>

    <script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

  • Profile Image
    jonathan
    Answered on February 19, 2014 at 02:34 AM

    Hi Philip,

    Can you please try also excluding the scripts part when you embed the form using iframe code embed?

    Example, after you get generate the iframe code in the builder, use only the iframe code part like this

    <iframe allowtransparency="true" src="//form.jotform.us/form/40488946387169" frameborder="0" style="width:100%; height:2362px; border:none;" scrolling="no"></iframe>

    Check the height number and modify accordingly.

    Hope this help. Inform us if issue persist.

    Thanks!