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

    Setting up lightbox jotform that opens only once per session - without the use of PHP

    Asked by roblucas on January 20, 2015 at 04:59 PM

    Hi,

     

    I have followed the tutorial here:

     

    http://www.jotform.com/help/140-Using-Cookies-to-Auto-Open-a-Lightbox-Form-Per-Browser-Session

     

    But cannot get the functionality to work. Where exactly on the FTP server should the php file be located?

     

    Thank you,

     

    Ryan

    session popup cookies js cookies lightbox
  • Profile Image
    JotForm Support

    Answered by EltonCris on January 20, 2015 at 05:56 PM

    Hi Ryan,

    You have to upload the php file to your server after creating it. You can place it anywhere you want as long as the server supports PHP. Or you can embed the entire PHP code within the existing php file on your server. Sorry but we do not host php files here.

    Let us know should you have further questions. Thank you!

  • Profile Image

    Answered by roblucas on January 20, 2015 at 06:02 PM

    I actually found out my server does not support PHP. Is there a javascript option or other workaround to add the cookie for new browser sessions?

  • Profile Image
    JotForm Support

    Answered by EltonCris on January 20, 2015 at 06:08 PM

    Hi,

    I think that's possible with javascript. I'm not that good with javascript but I'll get back to you later today with the javascript version of that guide.

    Stay tuned for the updates!

  • Profile Image

    Answered by roblucas on January 21, 2015 at 11:11 AM

    Hi, any word on the javascript version, or non php version?

     

    Thank you,

     

    Ryan

  • Profile Image

    Answered by Ben on January 21, 2015 at 12:04 PM

    It would be best if you can give us the link to the page with jotform on your website, but the general idea of javascript cookies would go like this:

    document.cookie = "my cookie value";

    If there are no other cookies on your website then it would be possible to add the lightbox code into a code bloc such as this one:

    if(document.cookie)
    {
     //lightbox code goes here
    }

    If of course there are other js cookies on your website you would need to go over all of them and find the one you have set, which we would be happy to assist you with, but as it would only add complexity, I would like to keep to the first / simpler version and see how it goes.

    Now as you say that it is not supporting php I presume that it is supporting ASP instead?

    If so, please take a look here: http://www.jotform.com/answers/68564-nice-guide-thanks-

    ASP and PHP are fairly similar and working with them means that you are not relaying on user browser cookies.

    I would also like to mentioned that I believe that the javascript cookies are per page, not per session, but would need to look into that.