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

    Wix iFrame Embed: Form does not scroll to the top of Thank You page after being sumitted.

    Asked by fiixcleaning on August 16, 2016 at 09:40 PM

    Hi. when submitting form, the thank you page can not be seen as is is generated at the top of the page and the page does not auto scroll up. I have seen other people with the same problem and the solution to put a section of code in window.parent.scrollTo(0,0)" Mine has this code but the problem still exists.

    website: http://fiixcleaning.wixsite.com/fiix2/residentialquotes

    Page URL:
    http://fiixcleaning.wixsite.com/fiix2/residentialquotes

    scroll thank thank you form scroll up
  • Profile Image
    JotForm Support

    Answered by Chriistian on August 17, 2016 at 03:08 AM

    I sent a test submission to your form and I was able to replicate the issue. The page does not scroll to the top after I hit submit. Can you try replacing the onload="window.parent.scrollTo(0,0)" to this one: onload="self.scrollTo(0,0)"

    You can use the iFrame code below where I have added the code:

    <iframe id="JotFormIFrame" onload="self.scrollTo(0,0)" allowtransparency="true" src="https://form.jotform.com/62291385193965" frameborder="0" style="width:100%; height:539px; border:none;" scrolling="no"> </iframe> 

    Please let us know if the issue still persists.
    Regards.

  • Profile Image

    Answered by fiixcleaning on August 17, 2016 at 03:36 AM

    Hi, I have done that but the issue is still there

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 17, 2016 at 04:49 AM

    I checked the code of your page and it looks like the iframe still has the onload="window.parent.scrollTo(0,0)" instead of onload="self.scrollTo(0,0)"

    Please try changing it again. For your convenience, here's the code:

    <iframe id="JotFormIFrame" onload="self.scrollTo(0,0)" allowtransparency="true" src="https://form.jotform.com/61878390354869" frameborder="0" style="width:100%; height:539px; border:none;" scrolling="no"> </iframe> 

    Please let us know how it goes.
    Thank you.

  • Profile Image

    Answered by fiixcleaning on August 17, 2016 at 04:43 PM

    Hi, Where do i change this code. On the Jot form website or my website?

  • Profile Image
    JotForm Support

    Answered by KadeJM on August 17, 2016 at 07:51 PM

    You change this inside of the embed code you grab from our website before you embed it onto your website page.

    Christiian has already given you the code for this with the changes in it above.

    You can just take that and re-embed it onto your website and that should resolve it for you.

  • Profile Image

    Answered by fiixcleaning on August 17, 2016 at 08:18 PM

    I have done this but the problem still exists

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 17, 2016 at 09:36 PM

    I can confirm that you have applied the code, but the issue still persists. Perhaps we can try using a different embed method instead. Please follow this guide to embed the form to you page: Adding a Form to Your Wix Site.

    Do let us know if the issue persists.
    Regards.

  • Profile Image

    Answered by fiixcleaning on August 17, 2016 at 09:42 PM

    Hi,

    The issue is still there.

    Thanks

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 17, 2016 at 11:43 PM

    Thank you for testing.  Can you try adding the code again but this time with the script included. You can copy the code below and use it.

    <iframe id="JotFormIFrame" onload="self.scrollTo(0,0)" allowtransparency="true" src="https://form.jotform.com/61878390354869" frameborder="0" style="width:100%; height:539px; 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; } var isJotForm = (e.origin.indexOf("jotform") > -1) ? true : false; if(isJotForm && "contentWindow" in iframe && "postMessage" in iframe.contentWindow) { var urls = {"docurl":encodeURIComponent(document.URL),"referrer":encodeURIComponent(document.referrer)}; iframe.contentWindow.postMessage(JSON.stringify({"type":"urls","value":urls}), "*"); } }; if (window.addEventListener) { window.addEventListener("message", handleIFrameMessage, false); } else if (window.attachEvent) { window.attachEvent("onmessage", handleIFrameMessage); } if(window.location.href && window.location.href.indexOf("?") > -1) { var ifr = document.getElementById("JotFormIFrame"); var get = window.location.href.substr(window.location.href.indexOf("?") + 1); if(ifr && get.length > 0) { var src = ifr.src; src = src.indexOf("?") > -1 ? src + "&" + get : src + "?" + get; ifr.src = src; } } </script>

  • Profile Image

    Answered by fiixcleaning on August 18, 2016 at 12:03 AM

    Issue still there. 

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 18, 2016 at 01:15 AM

    It seems that the issue persists no matter what we try. Instead of using the default Thank You page, perhaps you can instead try creating a custom Thank You page on your Wix site and redirect the form to that custom page after submission. You can follow this guide on Redirecting Users to a Different Page.

    Please let us know if you need further assistance.
    Regards.

  • Profile Image

    Answered by fiixcleaning on August 18, 2016 at 02:15 AM

    I have made a page. Now it does not redirect. 

  • Profile Image

    Answered by fiixcleaning on August 18, 2016 at 03:20 AM

    The form just disapears and leaves you on the same page but now blank

     

  • Profile Image
    JotForm Support

    Answered by Chriistian on August 18, 2016 at 05:09 AM

    I tested the same on my wix site and I can confirm that when redirecting to a page, the form disappears and the frame where the form is located appears blank.

    Since redirecting to a custom page is not allowed for wix, then we will need to use the default Thank You page instead. Please use the default Thank You page for now. Meanwhile I will raise the issue regarding the form not scrolling to the top to our developers for further investigation.

     

    I cannot provide an ETA on when this issue will be resolved, but we will let you know on this thread nonce we have any news. Regards.