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

    Add a close button on thank you page

    Asked by MESAR on February 26, 2014 at 09:24 AM

    Im trying to add a button that close current page (thank page after submit) but it wont let me do it.
    How can i do it ? 

  • Profile Image

    Answered by datasphere on February 26, 2014 at 10:21 AM

    Hi Mesar,

     

    you can use the wizard it is encircled in the image :

    this is a short youtube how-to video

     

     

     

    the Default Thank You Page is the default thank you page used in all JotForm forms by default.

    here is the short form example of the thak you page

    http://www.jotformpro.com/form/30048750287960

    There's no way to edit it unless you switch to another thank you option

    the

    custom thank you page

    https://www.jotform.com/help/89-Create-a-Custom-Thank-you-page-with-Auto-redirect

  • Profile Image

    Answered by MESAR on February 26, 2014 at 10:25 AM

    i choose the Thank you message option and i changed the message, and i could even swith to html source but the code i enter there wont stay

  • Profile Image

    Answered by Carina on February 26, 2014 at 10:51 AM

    The html editor doesn't allow scripts to prevent malicious scripts to be used. If you wish to use javascript it is better to use the "custom url" option and then insert the code on a custom html page created by you:

    http://www.jotform.com/help/89-Create-a-Custom-Thank-you-page-with-Auto-redirect

    Kindly let us know if you need more assistance.

     

  • Profile Image

    Answered by datasphere on February 26, 2014 at 10:56 AM

    Well, 

    you have clicked save I presume on the uper left of the Jotform?

    Possible you could try go and clean the Jotform inside-cache

     

    You can use the following steps to clear your form cache yourself:

    (1) Go to My Account

    (2) Go to Settings

    (3) Last, click on Clear Cache and a pop-up will appear saying " All Caches are Cleared! " then click okay and you are done!

    1

     


    If you are still having trouble beyond this, you may also want to try Clearing your Browser Cache in conjunction with this, or change to other Browser since it will aid in correcting the problems associated with.

    Here is the help article where I found this info:

    http://www.jotform.com/help/229-How-to-Clear-your-Form-Cache

     

    Hope this solves your situation !

     

    Damir

  • Profile Image

    Answered by MESAR on February 26, 2014 at 02:44 PM

    i just need to add a button that close the thank you page (this actual page is opened in another tab)

  • Profile Image

    Answered by MESAR on February 26, 2014 at 04:12 PM

    if i understand, the only way is to create my own page ?

  • Profile Image

    Answered by Carina on February 26, 2014 at 08:16 PM

    If you actually want to close the browser window, yes, as this script is not accepted by our HTML editor.

    You can paste this into your html document:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Untitled Document</title>

    </head>

     

    <body>

     

    <p align="center">Thank you for your submission!</p>

    <p align="center">

    <button onClick="JavaScript:window.close()">Close Window</button>

    </p>

    </body>

    </html>

     

    You can test the result here:

    https://shots.jotform.com/carina/tutoriais/close_button.html

    Then you can use the previously described "custom url" option, to link your form to your html page.

    And you can use your html editor to customize contents or formatting.

    If you need further assistance let us know please.

  • Profile Image

    Answered by MESAR on February 27, 2014 at 08:45 AM

    the link u sent me doesnt actually work :(
    the browser doesnt close when i hit the close window button 

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 27, 2014 at 12:15 PM

    @ MESAR 

    I assumed you are using firefox. Window.close() is a known firefox issue, you cannot close firefox browser with this piece of javascript. Unfortunately, I found no trick to counter this yet, however the above script works fine with Chrome and IE I guess. You can find out more when you search at google.

    Let us know should you have further questions. Thanks!

  • Profile Image

    Answered by MESAR on February 27, 2014 at 01:29 PM

    Im with chrome and i just tried it again and still doesnt close the tab

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 27, 2014 at 03:30 PM

    @MESAR

    You're right, I just got a message on the Chrome browser that is similar with Firefox.

    "Scripts may close only the windows that were opened by it."

    Is it not possible to use the close button on the browser? You can also try the following dirty workarounds but I'm not sure if this helps. http://stackoverflow.com/questions/10141674/how-do-you-close-a-window-in-javascript. You should be able to find more on Google. There is nothing we can do much about this unless the function exists on Jotform.

    Thanks!

  • Profile Image

    Answered by MESAR on February 28, 2014 at 09:06 AM

    ok so if i make my own page with my own script, where do i put it and what is the url i have to put in the Custom URL choice ?

  • Profile Image
    JotForm Support

    Answered by TitusN on February 28, 2014 at 11:57 AM

    Hello,

    If the script is similar to the button element shared by Carina, then it goes where you want the button to appear on your page.

    <button onClick="JavaScript:window.close()">Close Window</button>

    Use the Thank you page URL redirect method to implement your solution, and use the link to the page you just created with the close button. 

    Why not create the page, then let us know and we shall advice?

    Looking forward to your response.

  • Profile Image

    Answered by MESAR on February 28, 2014 at 12:36 PM

    i found the way to make it work ono google chrome
    i did this

    <h2 style="text-align:center;padding-top:20px;">

    Merci, demande envoy&eacute;!

    <form>

    <input type="button" value="Revenir au site" onClick="window.open('', '_self', ''); window.close();">

    </form>

    </h2> 

    everything works fine now :D