How Can I Configure a Lighbox Form to Automatically Close Upon Submission?

  • Profile Image
    Asked 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

  • Profile Image
    Answered on March 24, 2013 at 02:13 AM


    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.



  • Profile Image
    Answered 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
    Answered 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:

    If you need further help, please let us know.


  • Profile Image
    Answered 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.


  • Profile Image
    Answered on March 26, 2013 at 11:41 PM


    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 on March 02, 2014 at 08:30 AM


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




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


    display:none !important;





  • Profile Image
    Answered on September 28, 2015 at 04:38 AM

    How can i configure light box with automatic disappear feature after submission.
  • Profile Image
    Answered 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.

  • Profile Image
    Answered on December 23, 2016 at 01:19 PM

    Hi @abajan,

    Removing the '2' from the src code doesn't seem to work anymore.

    Is there another workaround for disabling the close of a lightbox form when the user clicks outside the form window?

    Thanks in advance for your help!