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

    Back & Next forms

    Asked by RHemery on May 12, 2015 at 05:02 AM

    Hi there, I have a form here:

    http://www.bedford.ac.uk/misc/2015-welcome-day

    When you fill it in and click Next, is there anyway to prevent it scrolling down the page rather than it staying fixed at the top?

    Thanks

    Rich

    Page URL:
    http://www.bedford.ac.uk/misc/2015-welcome-day

    next fill www thanks
  • Profile Image
    JotForm Support

    Answered by Boris on May 12, 2015 at 06:06 AM

    Hello.

    This is caused by having multiple JotForm forms embedded into the page, and the bottom form (Sign-up to our e-newsletters) is thinking that upon submitting another form you are trying to scroll this one into view.

    Please edit the HTML code of your website, and try changing this code:

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

    into this:

                        <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>Please try it out and let us know how it goes.

  • Profile Image

    Answered by RHemery on May 12, 2015 at 08:09 AM

    Thanks, perfect.

  • Profile Image
    JotForm Support

    Answered by Boris on May 12, 2015 at 08:16 AM

    You are welcome, I'm glad that it helped.

    Please don't hesitate to contact us again if you need any help with using JotForm, we are here to help.

    Kind regards.