Solved! Go to Solution.
Hi I'm having trouble. I've added this to every page on our site so no matter the entry point I catch them with the lightbox form at least once. but I want it to disable completely for the session once they x out of it. Any help here? Here's the code I have:
<script src="//app-aba.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1043"></form>
<script>MktoForms2.loadForm("//app-aba.marketo.com", "648-VJF-461", 1043, function (form){
var lightbox = MktoForms2.lightbox(form).show();
form.onSuccess(function(){
lightbox.hide();
return false;
});
});
</script>
Thank you so much!! Works perfectly!
For this hide - does it only hide when you submit the form?
What if they filled out the form and refreshed the page - will the form show again or is there a way to hide it since we already know the user?
Thanks.
This type of "hide" is different. What you're talking about is the "If Known Lead, Show.." option in the form's Setup.
How would the “If known lead” work with a lightbox? Our goal is to avoid the lightbox if we know who the lead is.
I showed this exact thing in a relatively recent post... can't look for it now as I'm on the road. But the technique is to have a script in the Known Lead HTML that hides the whole modal (.mktoModal) by adding a class. You prepare the form's custom CSS with the_same_class { display: none }