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

  • Profile Image
    stretchandstaple
    Asked on March 02, 2015 at 08:52 PM
  • Profile Image
    EltonCris
    Answered on March 03, 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!