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

    Form jumps down when clicking on next button

    Asked by rvselect1234 on June 22, 2016 at 06:10 PM

    When someone is completing our form and selects 'Next' the next section jumps down and skips the top line, almost as if it is bookmarked. Any idea what could be causing the issue?

     

    Form - http://www.rvselectinc.com/rv-description/

    Page URL:
    http://www.rvselectinc.com/rv-description/

    form jumps script conflict
  • Profile Image
    JotForm Support

    Answered by jonathan on June 22, 2016 at 10:08 PM

    I was able to see the issue as well when I test the form on your website

    I think it has to do with script conflict that is happening on the page between the form scripts and those existing on your website.

    To fix, please try removing first the publish form in your website. And then re-publish it using instead its iframe publish code.

    User guide: Getting-the-form-iFrame-code

    You can test again after publishing the form. See if the jumping behavious still happens.

    Let us know if this did not resolve the issue.

  • Profile Image

    Answered by rvselect1234 on June 24, 2016 at 04:12 PM

    I've updated the code on the page http://www.rvselectinc.com/rv-description/ to the iframe version and it still seems to be jumping.

  • Profile Image
    JotForm Support

    Answered by Kiran on June 24, 2016 at 05:18 PM

    Please try embedding the form using the following embed code.

    <iframe

    id="JotFormIFrame"

    onload="window.parent.scrollTo(0,0)"

    allowtransparency="true"

    src="https://form.jotform.com/42304323515140"

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

    Let us know if the issue still persists. We will be happy to assist you further.

     

  • Profile Image

    Answered by rvselect1234 on June 24, 2016 at 08:01 PM

    That seems to work. Thank you!

  • Profile Image

    Answered by rvselect1234 on June 28, 2016 at 01:50 PM

    Actually using this code caused the 'submit form' to become unviewable on my mobile site (which we only just noticed!). Any other solutions?

  • Profile Image
    JotForm Support

    Answered by Kiran on June 28, 2016 at 02:06 PM

    I have checked the web page on a mobile emulator and it seems to be working fine. Please see the screenshot below:

    Which mobile phone you are experiencing the issue with to see if we can replicate the issue at our end?

  • Profile Image

    Answered by rvselect1234 on June 29, 2016 at 08:04 PM

    I went in and fixed it immediately by using the iFrame code instead, so it works again. But now the issue of the form jumping is back.

  • Profile Image
    JotForm Support

    Answered by Kiran on June 29, 2016 at 09:35 PM

    Could you try replacing the form URL with https://form.jotform.com/42304323515140?nojump in the iframe embed code and see if that works?