Lightbox form opening when button is clicked

Anonymous
Not applicable

Re: Lightbox form opening when button is clicked

chrome and the jsfiddle and also firefox too. Am I missing something? I see in the original embed code I have this:

<script src="//app-ab14.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_3939"></form>

<script>MktoForms2.loadForm("//app-ab14.marketo.com", "961-UXG-821", 3939, function (form){MktoForms2.lightbox(form).show();});</script>

SanfordWhiteman
Level 10 - Community Moderator

Re: Lightbox form opening when button is clicked

It works for me in Chrome 50, FF 53.

Anonymous
Not applicable

Re: Lightbox form opening when button is clicked

even in jsfiddle you see it popping up?

SanfordWhiteman
Level 10 - Community Moderator

Re: Lightbox form opening when button is clicked

Yep.

Anonymous
Not applicable

Re: Lightbox form opening when button is clicked

I for the life of me cannot get this to work. I have a Marketo hosted page with this code

in the body:

<div>

<form id="mktoForm_1225"></form>

<button  onclick="MktoForms2.whenReady(function(form){ MktoForms2.lightbox(form).show(); })">Sign Up to Learn More</button></div>

</div>

This in the Head: <script src="//app-ab26.marketo.com/js/forms2/js/forms2.min.js"></script>

and this in the CSS:

.mktoForm { display: none; }

.mktoModal .mktoForm { display: block; }

Any ideas as to how I'm implementing this incorrectly?

SanfordWhiteman
Level 10 - Community Moderator

Re: Lightbox form opening when button is clicked

Pls open a new thread and post a link to your real page.