Embed Marketo Form inside Wordpress: Show Thank You Message Without a Follow-Up Landing Page

mwmarketing
Level 2

Embed Marketo Form inside Wordpress: Show Thank You Message Without a Follow-Up Landing Page

I recently embeded a Marketo contact us form into our new WordPress site using the native code inside deign studio. I'm trying to make the form submission resolve to a thank you message inside the content block that holds my embeded form code below. How would I accomplish this?

 

<script src="//pages.umt360.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_18"></form>
<script>MktoForms2.loadForm("//pages.umt360.com", "733-BGB-566", 18);</script>

 

We previously hosted the form inside an iframe using the following LP's:

 

https://pages.umt360.com/ContactUs.html

 

https://pages.umt360.com/Website_ContactUs_TY.html

 

I found a couple of articles and discussions but they aren't detailed enough for me to understand where I place the code or where exactly I readjust it inside the code before pasting it into an HTML block on WordPress.

 

Here are two older discussions I found on the topic.

https://nation.marketo.com/t5/product-discussions/convert-form-embed-script-to-iframe/td-p/169130

https://developers.marketo.com/blog/show-thank-you-message-without-a-follow-up-landing-page/

 

 

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Embed Marketo Form inside Wordpress: Show Thank You Message Without a Follow-Up Landing Page

That last link you posted is an oldie but goodie and has everything you need.

 

You could place your <div id="confirmform"> inside the same content block that holds the form. It just so happens in the example that the <div> is in a different part of the DOM. But it could just as easily be arranged like so:

 

<div id="your-cms-content-block">
  <form id="mktoForm_18"></form>
  <div id="confirmform" style="visibility:hidden;">Thank You content goes here.</div>
</div>

 

 and use the same JS.

 

I don’t usually do it in such a primitive way myself (setting the inline style gives me the willies) but it works.

mwmarketing
Level 2

Re: Embed Marketo Form inside Wordpress: Show Thank You Message Without a Follow-Up Landing Page

Thanks for the reply. We ended up creating a WordPress thank you page that our forms redirect to. I set it up on the form settings menu of #2.

SanfordWhiteman
Level 10 - Community Moderator

Re: Embed Marketo Form inside Wordpress: Show Thank You Message Without a Follow-Up Landing Page

OK. Any particular reason you changed your requirements?