Source Code vs Embed Form - iFrame

  • Profile Image
    Asked on July 14, 2015 at 10:03 PM


    I am a user of Shopify.  I inserted the Source Code generated by Jotform (as illustrated below) on the new template but then I got the double headers:

    <script type="text/javascript" src=""></script>
    I tried many other ways without success until I inserted the iFrame under Embed Form (as illustrated below) on the new template and I got what I have now:
    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="" frameborder="0" style="width:99%; height:1315px; border:none;" scrolling="no"></iframe>
    <script type="text/javascript">window.handleIFrameMessage = function(e) {var args =":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight" = args[1] + "px";break;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) { = 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>

    Can you elaborate the difference between the two.

    To access myshopify webpage, the password is fok, this free-trial will end in 3 days time.



  • Profile Image
    Answered on July 15, 2015 at 03:12 AM


    You can check this guide on what embed code you can use:

    Depending on the website and platform you have, basically the "Source code" found in the form builder is just the default embed code for easy access.

    If the default embed code doesn't work in your website or platform, you can check our "Embed Form" options to use different embed code instead.


    Now for your question, the iFrame embed code is usually used when there's a code conflict between your website and the form, causing some problems like form not working as expected or styling issues. If you use the iFrame code, external sources will not affect the form inside it.

    I hope that helps. Do let us know if you need more information on this.


  • Profile Image
    Answered on July 15, 2015 at 03:33 AM
    Many thanks!
  • Profile Image
    Answered on July 15, 2015 at 04:14 AM

    On behalf of my colleague, you are welcome.

    Feel free to contact us if you have any other questions.