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 to automaticaly close Thank you page after submiting on iPad

    Asked by Wtfuck on May 19, 2017 at 12:59 PM

    Hi,

    I'm using my form for my own business and I need to be abble to close the thank you page after let say 3sec.

    Regards

  • Profile Image
    JotForm Support

    Answered by david on May 19, 2017 at 02:16 PM

    It is not possible to make the default thank you page automatically close on its own.  This could be done using your own custom thank you page with a script to close the page as described in this thread:

    https://www.jotform.com/answers/338981-Add-a-close-button-on-thank-you-page

  • Profile Image

    Answered by Wtfuck on May 19, 2017 at 02:49 PM

    I hear you but I don't need a button to close the page.

    I understand that I need to upload my own html page.

    Can you give me the code to be able after 5 sec on the thank you page to be automatically closed

    Regards

  • Profile Image
    JotForm Support

    Answered by david on May 19, 2017 at 03:13 PM

    The best example I could find would be in this page and does have limitations:

    http://formdemos.awardspace.biz/form_23062539826962.html

    It uses the full source code for the form and the following script to pop-up the thank you page:

    <script type="text/javascript">
        (function () {  // Hides this script from the global object

            // Controls position of popup
            function popupWindow(url, title, w, h) {
                var left = (screen.width / 2) - (w / 2),
                    top = (screen.height / 2) - (h / 2);

                // First two concatenators used to break 1 long line into 3
                return window.open(url, title, "toolbar=no, location=no, directories=no, " +
                        "status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, " +
                        "width=" + w + ", height=" + h + ", top=" + top + ", left=" + left);
            }

            // Last 2 parameters of popupWindow are the popup's width and height respectively
            document.getElementById("input_2").onclick = function () {
                document.forms[0].submit();
                popupWindow("thanks_23062539826962.html", "Input Registered", 550, 300);
            };
        })();
    </script>

    It then uses the following script on the thank you page to close the window:

    <script type="text/javascript">
            // (C) 2001 www.CodeLifter.com
            // http://www.codelifter.com
            // Free for all users, but leave in this header

            // Edit "2500" to adjust the length of time popup remains onscreen
            // It's currently set to 2.5 seconds
            var howLong = 2500, t = null;

            function closeMe() {
                t = setTimeout("self.close()", howLong);
            }
        </script>
    </head>
    <body onload="closeMe(); self.focus();">

    It is set to 2.5 second but changing the howLong variable to 5000 instead of 2500 would change it to 5 seconds. 

    Please note that the first script would require some updating to your specific form and these types of custom solutions we do not support.  Also, if the browser being used blocks pop-up windows or javascript, this solution would not function correctly.