How can we disable closing when clicking outside of the lightbox?

  • Profile Image
    Aries Joseph 
    Asked on April 27, 2016 at 11:47 AM
  • Profile Image
    Charlie
    Answered on April 27, 2016 at 01:25 PM

    Looks like it is not quite possible, please allow me some time to research on this and see if I can find a workaround or a solution. 

  • Profile Image
    Charlie
    Answered on April 27, 2016 at 01:45 PM

    Unfortunately, it seems like this is not possible. The function is directly called on this link: https://form.jotform.com/static/feedback2.js?3.3.REV. We cannot directly edit or add additional parameters like backdrop: "static" that should prevent the modal/lightbox to close when you click outside the box.

    I see you are loading your own scripts, I'm not quite sure if your website is loading the jQuery library. The workaround that I have in mind is:

    1. First, create your own modal or lightbox version using jQuery or Bootstrap. I believe it is equivalent to the "Dialog" element there. Here's a link to it: https://jqueryui.com/dialog/#modal-message 

    2. Embed the form in the modal using the iFrame embed code

    3. In your Modal/Dialog script, add the parameter backdrop: "static" on it. You can see how it works in this example: http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_ref_js_modal_backdrop&stacked=h 

     

    I hope that helps.