I'm having issues with implementing lightbox onto a page where another embedded Marketo form is placed.
Basically it is same as https://nation.marketo.com/t5/Product-Discussions/Issues-submitting-embedded-Marketo-forms-on-websit....
The thing is that the lightbox is intended to be added over existing pages where I can't change the embedded form code.
The page is outside of Marketo LP.
The error only seems to happen when another form is present so I suspect the multiple forms are the cause of the error message.
Since I tried various things over 8 hours and the original page does not exist anymore but if there are solutions to avoid this, would you share?
Some references I've looked at:
Also, I thought about iframe which basically physically separates two forms but treating on submission behavior is troublesome (as I only vaguely understand js and there is no one else to support me) and it is not good for SEO anyway.
The original lightbox script is as below;
<script src="https://app-sjg.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_99999"></form>
<script>
var done;
function loadLightBoxOnce (func) {
if(!done) {
done=true;
MktoForms2.loadForm("https://app-sjg.marketo.com", "999-ABC-999", 99999, function (form){
var lightbox = MktoForms2.lightbox(form).show();
form.onSuccess(function(){
lightbox.hide();
return false;
});
});
}
}
setTimeout(loadLightBoxOnce,6000);
</script>
Solved! Go to Solution.
Load all forms from the same domain. You probably have one form loading from your LP domain and the other loading from app-*.marketo.com.
Sanford,
Thank you very much. I would have never thought that would could be the cause of the behaviour.
And yes, it seems that original embedded form + lightbox type multiple forms in a page is working!!
Surprised that the issue could be solved that simple.
Could not thank you much enough.
Jin