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 do I load lightbox as soon as someone visits the website?

    Asked by jentoronto on May 30, 2011 at 07:48 PM


  • Profile Image
    JotForm Support

    Answered by liyam on May 31, 2011 at 11:12 AM

    Hello Jentoronto,

    There is a way for your form to pop-up once the page loads up.  The only difficult part is figuring out how to make it load depending on if the visitor has already filled up the form or not, unless you are planning to use PHP coding with authentication or something that will tell that the user is logged in, you do not need to show up the form.

    Here's the sample code for making your feedback form script pop-up once the page is visited:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
        <title>Contact Us</title>
    <body onload="document.getElementById('lightbox-11493338180').click()">
    <script src="//www.jotform.com/min/g=feedback" type="text/javascript">
    new JotformFeedback({
    windowTitle:'Contact us',
    <input id="lightbox-11493338180" style="display:none" type="submit" value="lightbox" > </body>

    I have highlighted the important parts that you should take note of:

    1. The onload event property inside the body tag
    2. I have changed the anchor tag (<a id=...>) to an input tag.  This way, the onload event will be able to mimick the click of the mouse on an input tag.

    As for your show-only-once-per-user option, this is quite difficult to accomplish as you will need to validate the user via authentication before you could put up a condition to show the form or not.  Another option is to use cookies but this situation is quite different as this will show the form once only from one computer browser instead of one visitor.

    If you would like to consider the cookie based option, just let me know.


  • Profile Image

    Answered by jentoronto on May 31, 2011 at 07:06 PM


  • Profile Image
    JotForm Support

    Answered by NeilVicente on May 31, 2011 at 07:56 PM


    That is because you have another feedback form embedded in your site. Go find the other feedback code and delete it.

    That should fix it.


  • Profile Image

    Answered by jentoronto on May 31, 2011 at 07:57 PM

    Yup, fixed. Thanks so much!

  • Profile Image

    Answered by okcomputer on April 05, 2012 at 12:35 PM

    Hi I just implemented the pop up lightbox with thanks to your information above. I would however really appreciate your Cookie Based Solution to avoid it popping up every single time the user visits the site


  • Profile Image

    Answered by fxr on April 05, 2012 at 12:37 PM

    There is a cookie based solution described outlined in this User Guide Article

  • Profile Image

    Answered by anudeep on July 03, 2012 at 07:40 AM

    i tried with this but came like this can any body solve this


  • Profile Image
    JotForm Support

    Answered by liyam on July 03, 2012 at 07:45 AM

    Hello, anudeep.  Can you try again to give us the link to the screenshot?  The image did not appear properly from your post.