What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    iframe embed code has changed - do I need to update?

    Asked by rivmedia on March 01, 2015 at 10:33 PM

    I Just noticed that the iframe embed code for all my forms has changed since the last time I was editing them, and I'm wondering why? Was there an update? Is this going to cause any compatibility issues? Should I re-embed all my forms??

    My form on the website below use to have the following code:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.co/form/50108365241850" frameborder="0" style="width:100%; height:1157px; 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>

    Now however the code is just:

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

     

    Page URL:
    http://www.rivmedia.com.au/website-design-quote

    iframe embed My Forms JotForm style height
  • Profile Image
    JotForm Support

    Answered by Kiran on March 02, 2015 at 09:13 AM

    It is not required to re-embed the code, since we don't see any issues with the existing code. It seems that you have already re-embedded the new code on your webpage. I've tried submitting your JotForm on the webpage and I was able to submit the form without any issues. There shouldn't be any compatibility issues with the changed embed code. 

    Please let us know if you need any further assistance. We will be happy to help.

  • Profile Image
    JotForm Support

    Answered by ashwin_d on March 02, 2015 at 10:56 PM

    Hello rivmedia,

    Yes but I have other forms, so my question was should I re-embed with the new code.

     

    If the height of your embedded form looks good then no you do not have to re-embed your form again using new embed code. 

    Also you didn't answer my question as to why it changed in the first place ?

    Please be noted that the complete iFrame embed code includes the script code which you have mentioned in your first embed code above. The script code is used to auto adjust the height of your iFrame.

    The second embed code you have mentioned above does not have the script code. You must have most likely not copied the complete embed code or excluded it later. 

    Hope this answers your query.

    Do get back to us if you have any questions.

    Thank you!