SOLVED

Re: Form on external site not redirecting

Go to solution
trevlarrr
Level 4

Form on external site not redirecting

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

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Form on external site not redirecting

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.

View solution in original post

8 REPLIES 8
Jasbir_Kaur
Level 5

Re: Form on external site not redirecting

Hi @trevlarrr

 

You have to remove the below code from your page and related JS as well.

 

Jasbir_Kaur_0-1692269588855.png

 

Thanks!

Jasbir

trevlarrr
Level 4

Re: Form on external site not redirecting

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.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form on external site not redirecting

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.

Sandeepkumar2
Level 2

Re: Form on external site not redirecting

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...

Tags (1)
SanfordWhiteman
Level 10 - Community Moderator

Re: Form on external site not redirecting

Please try to provide something more helpful to the OP than simply restating their question.

Sandeepkumar2
Level 2

Re: Form on external site not redirecting

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."

SanfordWhiteman
Level 10 - Community Moderator

Re: Form on external site not redirecting

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.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form on external site not redirecting

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.