Multi-page form on SquareSpace not returning to top

  • Profile Image
    Asked on May 02, 2015 at 01:30 PM

    We have a multi page registration form at

    It is embedded using an iFrame.  When the user advanced to the next page the page does not scroll to the top of the form, which may confuse users.  Can you please help us with any options available to correct this?

    I saw this thread, which looks like the same issue:





  • Profile Image
    Answered on May 02, 2015 at 05:57 PM

    Please try to include the script portion (highlighted in yellow) of the iframe code in your site.

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

    It's possible now to embed custom scripts in Squarespace, so you would need to save the script above in a .js file and then include it on your site like this:

    <squarespace:script src="file_name.js" combo="true" />

    Please give it a try and let us know if this helps.