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-website/m-p/302432#M170318.
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:
https://nation.marketo.com/t5/Product-Discussions/Multiple-Forms-on-a-Page-Weird-behavior-when-some-labels-are/m-p/85090#M49459
https://nation.marketo.com/t5/Product-Discussions/How-to-use-same-form-on-page-twice-in-lightbox-and-embed/td-p/138283
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>
... View more