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 Can I Configure a Lighbox Form to Automatically Close Upon Submission?

    Asked by abhijit on March 24, 2013 at 02:11 AM
    The above code works perfectly, buy if I click outside the form anywhere on the page the form disappears. Is it possible that the form should disappear only when someone fills in the details and click on submit button?

    This is a re-post of a comment on How to Auto-popup a Lightbox Form

    click outside lightbox close on submit
  • Profile Image
    JotForm Support

    Answered by Welvin on March 24, 2013 at 02:13 AM

    Hi,

    Unfortunately, that is how it works and the window will also not close after hitting the submit button. You will have to click the "X" button to close the window.

     

    Thanks

  • Profile Image

    Answered by abhi002011 on March 26, 2013 at 01:24 AM

    So is there any other code available wherein the form will only disappear when somebody clicks on submit button? Any other option possible??

  • Profile Image
    JotForm Support

    Answered by abajan on March 26, 2013 at 06:29 AM

    The code provided by the Embed Form Wizard can be edited to prevent closure when the user clicks outside of the lightbox but having it close upon submission would require downloading the form files (see step 4 of this guide) and editing the form's script. Of course, the $64,000 question is what to change in the script! However, I will submit a ticket requesting that a parameter similar to openOnLoad:true (perhaps closeOnSubmit:true) be made available, so there would be no need to download and tinker with the form script.

    In the meantime, to prevent closure when outside of the lightbox is clicked, remove the "2", highlighted below, from the src attribute of the lightbox code:

    http://cdn.jotfor.ms/static/feedback2.js?3.1.2371

    If you need further help, please let us know.

    Thanks.

  • Profile Image

    Answered by abhi002011 on March 26, 2013 at 04:02 PM

    Great!! Abajan... Sir!! it worked for me. I just edit the code as you told and now the form doesnot disappear when somebody clicks outside the form on the page! So one worry for me is over . Now the second part, can you please provide me the code or any other solution so that the form is closed only when someone clicks the "submit" button. Also is there any way the "X" (close) button is removed or disabled? I want the form to be closed only when somebody fills in the form and click on "submit" button. My requirement is when a visitor browse my site and lands up to a particular page he/she has to fillup the form and only then the content on the page will be visible. No other way to close the lightbox form.

              Sir once again THANK YOU for your reply and solution to my query.

    Thanks

  • Profile Image
    JotForm Support

    Answered by abajan on March 26, 2013 at 11:41 PM

    @abhi002011

    There may be a workaround (as indicated by our colleague fxr in this thread) but I haven't come up with anything as yet.

  • Profile Image

    Answered by michaelbay123 on March 02, 2014 at 08:30 AM

     

    put this code between <head> to make 'x' button disappear

     

    <style>

     

    div.jt-feedback.ui-draggable div.jt-title div {

     

    display:none !important;

     

    }

     

    </style>

  • Profile Image

    Answered by yogesh1ag on September 28, 2015 at 04:38 AM

    How can i configure light box with automatic disappear feature after submission.
  • Profile Image
    JotForm Support

    Answered by Chriistian on September 28, 2015 at 06:10 AM

    Hi yogesh1ag,

     

    I have moved your question to a separate thread to we can better assist you. You can check it here. We will attend to your concern on that thread as soon as possible.

     

    If you have any further question, please feel free to contact us again by creating a new thread.
    Regards.