How to specify post submission/ thank you page for Marketo Form Embedded in Wordpress | Community
Skip to main content
New Participant
August 2, 2022
Solved

How to specify post submission/ thank you page for Marketo Form Embedded in Wordpress

  • August 2, 2022
  • 1 reply
  • 4271 views

I have a client who uses Marketo Forms embedded in Wordpress pages rather than Marketo Landing Pages. They inherited a setup where a new form was created for every webinar, because they relied on the form to control which thank you page the person was sent to upon submitting the form. I have them persuaded to use one webinar form instead. But that means they have to control which thank you page (post submission page) the form filler is sent to upon clicking the submit button. Can someone please point me to documentation that I can pass on that explains how to do this? I know that this is commonplace and not difficult but I'm not a coder so I don't know how to tell them how to do it (and their wordpress person does not know how).

 

Also - does this require using the Forms 2.0 API? 

 

Thanks in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Also - does this require using the Forms 2.0 API?

Yes, specifically the onSuccess event handler.

 

MktoForms2.whenReady(function(mktoForm){ mktoForm.onSuccess(function(submittedValues,originalThankYouURL){ // set the new Thank You URL, then redirect let newThankYouURL = "https://www.example.com/new/page/how/ever/you/choose/"; document.location.href = newThankYouURL; // you must return false so Marketo ignores the originalThankYouURL return false; }); });

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
August 2, 2022

Also - does this require using the Forms 2.0 API?

Yes, specifically the onSuccess event handler.

 

MktoForms2.whenReady(function(mktoForm){ mktoForm.onSuccess(function(submittedValues,originalThankYouURL){ // set the new Thank You URL, then redirect let newThankYouURL = "https://www.example.com/new/page/how/ever/you/choose/"; document.location.href = newThankYouURL; // you must return false so Marketo ignores the originalThankYouURL return false; }); });
New Participant
August 2, 2022

Thank  you!