Delay appearance of pop up lightbox form on page | Community
Skip to main content
October 22, 2014
Question

Delay appearance of pop up lightbox form on page

  • October 22, 2014
  • 2 replies
  • 1441 views
To increase our leads, we're considering using pop up lightbox subscription forms on certain web pages, but understand that delaying appearance of the form until the browser has spent some time on our site can be more effective. A short delay would at least give visitor time to see what page is about before form pops up requesting their details.

At the moment lightbox displays immediately on page view and I haven't been able to find any relevant settings when editing our test forms within the Design Studio. 

Is there any way that we can control the timing of Marketo lightbox forms? 


Regards
Leanne
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

October 22, 2014

Hi Leanne,

Below is an option

1. Nest form tag in a hidden div (see text in bold)
2. On the embed script nest the 


MktoForms2.lightbox(form).show();


statement in a setTimeout Method (see text in bold)

Set the number of milliseconds you would like to delay the display of the form. 5000 equals 5 seconds.

<script src="//app-sjo.marketo.com/js/forms2/js/forms2.js"></script>
<div style="display: none">
<form id="YOUR FORM ID"></form>
</div>
<script>
MktoForms2.loadForm("//app-sjo.marketo.com", "200-PGA-297", YOUR FORM ID, function (form){
    setTimeout(function(){     
        MktoForms2.lightbox(form).show();
    },5000);
});
</script>



Hope this helps

October 22, 2014
Thanks very much Haven - that seems to work!