URGENT Form is cutting off again

  • ICFforms
    Asked on August 25, 2015 at 10:01 AM

    Hello,

    I have been having this same issue multiple times with different responses to make edits etc.  We have now re-embedded a form (per the suggestion from a previous ticket) that was sent out to a large group of people and is now live, but on page 4-5, the end is cut off.  Please know that our web person has added a scroll bar for the time being, she mentioned that when you embed using the iframe, within the code it automatically says scrolling="no".  She has changed that to say yes for now, but why is that automatically selected and there is not an option to change that when you are generating the code?

     

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotformpro.com/form/52243372357959" frameborder="0" style="width:100%; height:4372px; 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;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

    Jotform Thread 647153 Screenshot
  • David JotForm Support
    Replied on August 25, 2015 at 12:32 PM

    Hi,

    I checked your page and your embed code looks a bit off.  The script that controls the height of the iFrame has some extra code added.  I'm not sure why it was:

    <iframe id="JotFormIFrame" style="width: 100%; height: 4402px; border: none;" src="https://secure.jotformpro.com/form/52243372357959" frameborder="0" scrolling="yes" width="320" height="240"></iframe></p>


    <script type="text/javascript">// <![CDATA[
    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;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}
    // ]]></script>

    It looks like they are trying to disable the script.  Usually this script automatically changes the height and width of the frame to suit the size of the form, which is why the option to enable scrolling is not given.  It should not be needed.

    Try pasting the code again without the CDATA tags added into the sizing script portion of the embed code to see if that helps.

  • ICFforms
    Replied on August 31, 2015 at 8:40 AM

    Hello,

    Thank you for this information.  We have been looking into this to see what is causing this code to be added and why and we have a support ticket into our website host to look at this further.  I appreciate you point this out to us as we wouldn't have noticed it.

     

    Thank you,

    Emily - ICF

  • Charlie
    Replied on August 31, 2015 at 11:26 AM

    Please do update us when you get a response from your website hosting provider regarding the added code.

    Thank you.