can I set timing to lightbox popup

  • rcousley
    Asked on November 13, 2021 at 8:44 AM

    can I set timing to lightbox popup

  • Girish JotForm Support
    Replied on November 13, 2021 at 8:55 AM

    Do you want to delay the pop-up?

    If yes, please check out this related ticket: https://www.jotform.com/answers/2385857-set-a-delay-time-in-lightbox-embed-code

    Would that work?

  • rcousley
    Replied on November 14, 2021 at 11:18 AM

    I'm trying but seeming to get it right. Can you please show where I went wrong in copying an inserting the code?

    <style></style>

    <p></p><script src="https://form.jotform.com/static/feedback2.js" type="text/javascript"></script><script type="text/javascript">

        var JFL_213163032697858 = new JotformFeedback({

         formId: '213163032697858',

              base: 'https://form.jotform.com/',

         windowTitle: 'sum n NICE from Suzuki',

         background: '#FFA500',

         fontColor: '#FFFFFF',

         type: '2',

         height: 750,

         width: 800,

         openOnLoad: true

        });

      </script>

    <aid="lightboxdelay"class="lightbox-21357249698871"style="cursor:pointer;color:blue;text-decoration:underline;display:none;"></a>

    <script type="text/javascript">

      var delayseconds =10;

      function pause(){

        myTimer = setTimeout('whatToDo()', delayseconds *1000);

      }

      function whatToDo(){

        document.getElementById('lightboxdelay').click();

      }

      window.onload = pause;

    </script>

    <p></p>


  • Mark_Louis
    Replied on November 14, 2021 at 12:02 PM

    Hi,

    Please send us the form link so we can check. Thank you.

  • rcousley
    Replied on November 14, 2021 at 12:15 PM
  • VincentJay
    Replied on November 14, 2021 at 1:46 PM

    Hi,

    The code you shared looks correct. If it is not working, please share the website where you embed the form so we can check the code you added.

    Thank you!

  • rcousley
    Replied on November 14, 2021 at 1:53 PM
  • VincentJay
    Replied on November 14, 2021 at 2:55 PM

    Hello,

    I checked the website and the embedded form but there's no added code for the delay.

    Here's a screencast sample on how to add it to the code:

    1636919538 619168f2ce5a1 bst2321t5321 Screenshot 10

    After that, add the script below of the lightbox embed code:

    1636919723 619169ab130c7 av2115 Screenshot 21

    Please try it and let us know how it goes. Thank you!

  • rcousley
    Replied on November 14, 2021 at 3:03 PM

    <style></style>

    <p></p><script src="https://form.jotform.com/static/feedback2.js" type="text/javascript"></script><script type="text/javascript">

        var JFL_213163032697858 = new JotformFeedback({

         formId: '213163032697858',

              base: 'https://form.jotform.com/',

         windowTitle: 'sum n NICE from Suzuki',

         background: '#FFA500',

         fontColor: '#FFFFFF',

         type: '2',

         height: 750,

         width: 800,

         openOnLoad: true

        });

      </script>

    <a id="lightboxdelay"class="lightbox-21357249698871"style="cursor:pointer;color:blue;text-decoration:underline;display:none;">Cool Contact Form</a>

    <p></p>

    <script type="text/javascript">

      var delayseconds =5;

      function pause(){

        myTimer = setTimeout('whatToDo()', delayseconds *1000);

      }

      function whatToDo(){

        document.getElementById('lightboxdelay').click();

      }

      window.onload = pause;

    </script>

  • rcousley
    Replied on November 14, 2021 at 3:17 PM

    thats what I have

  • VincentJay
    Replied on November 14, 2021 at 4:58 PM

    I see. Thank you for providing more information.

    Please use this code and add it to your form:

    <script src ="https://form.jotform.com/static/feedback2.js" type="text/javascript"></script><script type="text/javascript">
            var JFL_213163032697858 = new JotformFeedback({
              formId: '213163032697858',
              base: 'https://form.jotform.com/',
              windowTitle: 'sum n NICE from Suzuki',
              background: '#FFA500',
              fontColor: '#FFFFFF',
              type: 'false',
              height: 750,
              width: 800,
              openOnLoad: true
            });
        </script>
          <a id="lightboxdelay" class="btn lightbox-213163032697858" style="margin-top: 16px">
            sum'n NICE from Suzuki
          </a>
      <script type="text/javascript">
        var delayseconds =5;
        function pause(){
            myTimer = setTimeout('whatToDo()', delayseconds *1000);
        }
        function whatToDo(){
            document.getElementById('lightboxdelay').click();
        }
        window.onload = pause;
    </script>
  • rcousley
    Replied on November 14, 2021 at 5:06 PM

    it doesn't delay with this code. but changed my form to first lightbox pop-up with name of form and orange bar.

  • rcousley
    Replied on November 14, 2021 at 5:14 PM

    on another page, I try a workaround to use my own lightbox popup but the height cant be adjusted and the scroll option still doesn't get to the submit button. https://suzukijamaica.com/pages/terms/

  • Girish JotForm Support
    Replied on November 14, 2021 at 10:32 PM

    I checked your website https://suzukijamaica.com/ and the form pop up is delayed:

    1636946952 6191d408de52e screencast15112 Screenshot 10

    On the other page https://suzukijamaica.com/pages/terms/ you have added the same form using the default JS embed code and the iFrame code.

    Please use the same code structure that you have used on your main page on this page too.

  • rcousley
    Replied on November 14, 2021 at 10:37 PM

    ok I found what problem was on the front page, "openOnLoad: true" was there, so I deleted it and the delay worked.