I am using a form in a light box. I would like for someone to enter their email address before passing through to the page.

  • chartcapture
    Asked on March 28, 2014 at 4:11 PM

    Right now the user can either click behind the form to the page in the background and the form goes away to reveal the page, or they can click the "x" in the corner and access the page. Can I get rid of the "x" and prevent the user from accessing the page until the form is submitted? 

  • Mike_T Jotform Support
    Replied on March 28, 2014 at 5:33 PM

    It should be possible to hide the X button and disable outside click by injecting the following CSS to your page:

    <style type="text/css">

    /* Disable clicks outside of lightbox */
    .jt-dimmer {
    pointer-events: none;
    }
    /* Hide X close button */
    .jt-title div {
    display: none;
    }

    </style>

    However, the form will not close the lightbox upon receiving the entry. As a workaround, it is possible to set a Custom Thank You URL redirect on the form. It means that you will need two pages, one with Lighbox and second without one.

    I am using a form in a light box Screenshot 20

    Thank you.

  • chartcapture
    Replied on March 28, 2014 at 5:56 PM

    Thank you so much. Worked perfectly. 

  • Cliff
    Replied on June 20, 2016 at 6:49 PM

    Hi, 

    The code is working as far as not letting the user click outside the light-box to close it but the "X" is still showing on the light-box.

    I injected the code exactly. What could be wrong? 

  • jonathan
    Replied on June 20, 2016 at 8:51 PM

    @ Cliff

    We will resolve your issue here https://www.jotform.com/answers/865179