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

    Auto open the lightbox form after 15 seconds

    Asked by trainings24x7 on November 30, 2015 at 08:17 AM

    2. I want to make my form auto and open after 15 seconds.

     

    3. I also want to close this form, once it auto appears (for those)

     

    See the following code regarding this i have used in the website (header.php) wordpress

     

    <script src="https://form.jotform.me/static/feedback2.js?3.3.REV" type="text/javascript">
    var parentWidth = window.innerWidth;

        if(window.innerWidth <= 499) {parentWidth = window.innerWidth;} else {parentWidth =  500;}
    var JFL_53300890979464 = new JotformFeedback({ formId: '53300890979464', base:

    'https://form.jotform.me/', windowTitle: 'HELP? Contact Us', background: '#FFA500', fontColor:

    '#FFFFFF', type: 'false', height: 500, width: parentWidth, openOnLoad: true }); </script>

    <a id="lightboxdelay" class="btn lightbox-53300890979464" style="margin-top: 16px display:none;">

    Help? Contact Us </a>

    <script language="JavaScript">
    var delayseconds = 15;
        function pause() {
        myTimer = setTimeout('whatToDo()', delayseconds * 1000)
        }
       function whatToDo() {
    document.getElementById('lightboxdelay').click();
        }
    window.onload = pause;
    </script>

     

    Still form opens as website opens, delayseconds is not working

    auto popup
  • Profile Image
    JotForm Support

    Answered by Welvin on November 30, 2015 at 08:58 AM

    Please use the following lightbox scripts instead: http://pastiebin.com/565c55b300064

    This is working to my end. Here's an example page: https://shots.jotform.com/welvin/html/lightbox-delay.html.

    Please let us know if you need any further assistance implementing this.

  • Profile Image

    Answered by trainings24x7 on December 02, 2015 at 01:19 AM

    Please let me know that - I have wordpress website and where i can use this code. In header.php or somewhere else??

  • Profile Image

    Answered by trainings24x7 on December 02, 2015 at 01:33 AM

    Thanks Welvin,

     

    Now code is working in my wordpress.

  • Profile Image
    JotForm Support

    Answered by Jan on December 02, 2015 at 05:10 AM

    Glad to hear that your issue is now resolved. On behalf of Welvin, you're welcome. Let us know if you need further help. Thank you.

  • Profile Image

    Answered by nishant on December 04, 2015 at 11:32 PM

    Thanks Jan,

    But can i ask here one more question -

    What if i want my lightbox form on visibile for desktop. not for mobile, tablet and etc. Is there any wany to do it??

     

    Thanks,

    Nishant

  • Profile Image
    JotForm Support

    Answered by Welvin on December 05, 2015 at 03:47 AM

    The lightbox should be visible in the desktop. But I think you mean how to adjust the width of the lightbox form when viewed using a desktop. Is this correct? I will try to check this further and then let you know.

  • Profile Image

    Answered by trainings24x7 on December 05, 2015 at 04:04 AM

    Yes.

  • Profile Image
    JotForm Support

    Answered by Welvin on December 05, 2015 at 05:23 AM

    Thank you for the confirmation. I will let you know here once I have the correct codes for auto width adjustments.