New iframe embed code doesn't let form return to top after page breaks

  • stretchandstaple
    Asked on March 2, 2015 at 8:52 PM
  • Elton Support Team Lead
    Replied on March 3, 2015 at 12:52 AM

    Hi,

    Thanks for reporting. The script that is included on the iframe embed code before was temporarily removed due to the majority complaints from the users having issues with form length when iframe embed code and the script are used. I understand that the script has other uses like the multi-page form to go back to the top whenever the page break is used so I will ask our developers about the plan on this.

    For the meantime, you can always place this script along with your iframe embed code in order to fix the page break issues.

    <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>

    Thank you!