AnsweredAssumed Answered

Load Marketo Form Lightbox upon clicking specific link on landing page

Question asked by Nathan Allison on Sep 6, 2019
Latest reply on Sep 10, 2019 by Dave Roberts
<script src="//"></script>
<form id="mktoForm_1886"></form>
<script>MktoForms2.loadForm("//", "912-DWT-370", 1886);</script>

Hello Community! 


I would like to use the lightbox form code below (vanilla script from my instance) on a landing page. I know that using the script as-is will simply fire upon a page load, but I would like it to load when a user clicks a specific link.


I don't know enough about js in order to implement the script that way, so any suggestions would be super appreciated!


<script src="//"></script>
<form id="mktoForm_1886"></form>
<script>MktoForms2.loadForm("//", "912-DWT-370", 1886, function (form){MktoForms2.lightbox(form).show();});</script>