We have external developers creating a microsite for us but for some reason the Marketo forms we've created for them are not redirecting to the ungated version of the site and instead just display a thank you message, even though the form is set to redirect.
I'm guessing there's a conflict with some other code on the site they've created but is anyone able to see what it may be from this link?
Thanks
Solved! Go to Solution.
The problem is in this external JS file which includes a custom onSuccess listener that returns false:
l && u && x && L && A.then(() =>{
MktoForms2.loadForm(`https://${ L }.marketo.com`, x, u, M=>{
M.render(MktoForms2.$(G.current)),
M.submittable(r),
M.onSuccess(() =>(j(!0), !1))
})
})
Note it’s quite irresponsible of your developer to minify & package JS like this if they need 3rd parties to help them with their code.
Hi @trevlarrr,
You have to remove the below code from your page and related JS as well.
Thanks!
Jasbir
Thanks @Jasbir_Kaur apparently that is it but whatever they've used to build the site, that part of code is read-only so having to find a way to edit around it.
So they chose a 3rd-party site builder that doesn’t allow customization of Marketo form behaviors, only supporting on-page Thank You text? Pretty disappointing on a professional level, you have to be on top of this stuff.
I see the form doesn’t show at all right now because the Forms 2.0 library isn’t loading. Presumably they’re trying to handle Marketo forms themselves instead of trusting the 3rd party, which is the right move.
Check for this solution, mentioned here with the same problem, this might help
https://nation.marketo.com/t5/product-discussions/form-not-redirecting-on-completion/m-p/185793#M133...
Please try to provide something more helpful to the OP than simply restating their question.
Sure, on reviewing the LP, I found the form itself has the setting for showing a success message on submit, you need to add the redirection on form level only.
"successTitle":"Thank you. ","successBody":"You'll now be redirected."
But that's not actionable info, it's just a description of the problem ("There's a thank you container in the HTML").
The reason that on-page container is being shown instead of redirecting is there's a custom onSuccess function, which they need to disable or modify. Point them to exactly where it's located.
The problem is in this external JS file which includes a custom onSuccess listener that returns false:
l && u && x && L && A.then(() =>{
MktoForms2.loadForm(`https://${ L }.marketo.com`, x, u, M=>{
M.render(MktoForms2.$(G.current)),
M.submittable(r),
M.onSuccess(() =>(j(!0), !1))
})
})
Note it’s quite irresponsible of your developer to minify & package JS like this if they need 3rd parties to help them with their code.