can I set timing to lightbox popup

  • Profile Image
    rcousley
    Asked on November 13, 2021 at 08:44 AM

    can I set timing to lightbox popup

  • Profile Image
    gerardw
    Answered on November 13, 2021 at 08: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?

  • Profile Image
    rcousley
    Answered 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>


  • Profile Image
    Mark_Louis
    Answered on November 14, 2021 at 12:02 PM

    Hi,

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

  • Profile Image
    rcousley
    Answered on November 14, 2021 at 12:15 PM
  • Profile Image
    VincentJay
    Answered on November 14, 2021 at 01: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!

  • Profile Image
    rcousley
    Answered on November 14, 2021 at 01:53 PM
  • Profile Image
    VincentJay
    Answered on November 14, 2021 at 02: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.gi

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

    1636919723_619169ab130c7_av2115.gif

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

  • Profile Image
    rcousley
    Answered on November 14, 2021 at 03: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>

  • Profile Image
    rcousley
    Answered on November 14, 2021 at 03:17 PM

    thats what I have

  • Profile Image
    VincentJay
    Answered on November 14, 2021 at 04: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>
  • Profile Image
    rcousley
    Answered on November 14, 2021 at 05: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.

  • Profile Image
    rcousley
    Answered on November 14, 2021 at 05: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/

  • Profile Image
    gerardw
    Answered 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

    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.

  • Profile Image
    rcousley
    Answered 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.