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

    How can I make the page stay at the location of the submit button rather than scroll up after clicking on the submit form

    Asked by FamConference on July 23, 2015 at 07:55 AM

    I have a relatively long form that when submitted, the page scrolls to the very top but I would like it to stay at the location of the submit form so that the person submitting the form can see the "Thank You" message rather than have the form scroll up to the very top. I am kind of a newbie to this and would really appreciate any help.

     

    If you use the link below to submit a form, please make sure that it identifies it as a test rather than a genuine submission. Please use name as 'TEST' or something similar.

     

    Thanks,

    Ben

    Page URL:
    http://www.srmtfcc2015.com

    scroll Than after Make
  • Profile Image
    JotForm Support

    Answered by Kiran on July 23, 2015 at 11:36 AM

    The redirected thank you page height is lesser than the form height and hence the webpage is adjusting it's height by pulling the footer upside. 

    Could you try embedding the form using the following iframe code to see how it works? The following iframe embed code is having a little modification to the actual generated iframe embed code.

    <iframe id="JotFormIFrame" onload="self.scrollTo(0,0)" allowtransparency="true" src="//www.jotform.us/form/51473269379164" frameborder="0" style="width:100%; height:3158px; 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;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

    Let us know if the issue still persists. We will be happy to help.