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