The process is relatively simple. Build the landing page and a form in the usual process, however add an ‘HTML Element’ to the landing page:
Once the section has been added, enter the HTML below:
//get the form's jQuery element and hide it
document.getElementById('confirmform').style.visibility = 'visible';
<div id="confirmform" style="visibility:hidden;"><p>Thank you for your submission, we will be in touch soon.</p></div>
Two areas must be updated to ensure the code works upon form submission.
- <script src="//<host>/js/forms2/js/forms2.js"></script>
Update the area in red with the your Marketo account ID for example (//app-sj06.marketo.com/js/forms2/js/forms2.js)
- <div id="confirmform" style="visibility:hidden;"><p>Thank you for your submission, we will be in touch soon.</p></div>
Update the copy within the P tags, links can also be added here.
Once the two updates have been made, when the form is submitted the form Div will be removed and replaced with the ‘thank you’ content.
Require bespoke Marketo training to get you up to speed, plug skill gaps in your team or support you in becoming Marketo certified? Find out more and build your Marketo training plan.