Can a form in a lightbox be closed when the submit button is clicked?

  • ktjames
    Asked on September 10, 2015 at 1:25 PM

    I have this form set up as a lightbox:

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

    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?

    Aaron

     

  • Ben
    Replied on September 10, 2015 at 4:25 PM

    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?

  • ktjames
    Replied on September 11, 2015 at 2:39 PM

    Number two? The second option? Would redirecting be done through the JOT interface?

    Aaron

  • Elton Support Team Lead
    Replied on September 11, 2015 at 10:52 PM

    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