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

    Lightbox with cookies not working when back button is pressed

    Asked by Diego Gonzalez on May 12, 2015 at 12:25 AM

    I am using this:



    if(!isset($_COOKIE['beenhere'])) { 


        setcookie("beenhere", '1', time()+ 10800,"/","mydomain.com");







    if ($showlightbox) { ?>



          function openColorBox(){

            $.colorbox({iframe:true, width:"880px", height:"710px", href: "http://mydomain,com/myiframe/"});



          function countDown(){



            if (seconds === 0){






          var seconds = 1,

              i = setInterval(countDown, 1000);



    <?php  } ?>


    It works at the firs time, then if I went to another section of the webpage and press BACK BUTTON the script shows me again the iframe in the lightbox, If I refresh again the script stops. So the issue is just when I press the Back Button in Firefo, IE and Chrome.


  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 12, 2015 at 07:29 AM

    Hello Diego,

    We would like to check your lightbox form.

    Please share the web page URL where you have embedded your lightbox form and we will take a look.

    We will wait for your response.

    Thank you!

  • Profile Image

    Answered by Mariano  on May 26, 2015 at 10:34 AM

    Hi there! 

    How can I do to show the pop up at least 3 times instead 1 time?


  • Profile Image

    Answered by Carina on May 26, 2015 at 11:08 AM


    I moved your thread to a new one. You can find it here:


    Thank you