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.
Can a form in a lightbox be closed when the submit button is clicked?Asked by aaronwatts on September 10, 2015 at 01:25 PM
I have this form set up as a lightbox:
The client wants the page accessible ONLY if the form is filled out.
Then the form would disappear.
My first question is: Can a form in a lightbox be closed when the Submit button is clicked?
Yes, you should be able to do that by either one of the following ways Aaron:
1. create a simple js script that will check if the URL is of the form that is being filled out or the form that is submitted (all submissions happen on submit subdomain) and then if this is detected, to close the form
2. set the form to make a redirect to the same page, where the lightbox of the same was shown.
The first might look cleaner, but would require you to create the script that would constantly check the URL of the form - which means that there are many factors to consider, while the second option does make you reload the page, but it is a cleaner workaround of the same.
Would any of the two work as you need them Aaron?
Number two? The second option? Would redirecting be done through the JOT interface?
Yes Aaron, you have to set that on the form builder when you edit your form. Here's a guide for that: http://www.jotform.com/help/38-How-to-Redirect-to-a-Page-After-Form-Submission