Thanks for the hint. I added the code snippet to the end of the script and it does the trick. Maybe a bit abrupt (no smooth scrolling) but its better than nothing 🙂 Cheers again. Here is the final script that wroked for me: <script src="// EnterYourReferenceHere .marketo.com/js/forms2/js/forms2.min.js"></script> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script> <script>// <![CDATA[ MktoForms2.whenReady(function (form) { //Add an onSuccess handler form.onSuccess(function(values, followUpUrl) { var email = form.vals().Email, firstName = form.vals().FirstName, lastName = form.vals().LastName, html = "<h4 style='text-align: left;'>Thank you $firstName $lastName ($email) for your submission!<br/>Please check your email for a confirmation</h4>"; html = html.replace("$firstName", firstName); html = html.replace("$email", email); html = html.replace("$lastName", lastName); // Get the form's jQuery element and hide it form.getFormElem().hide(); window.scrollTo(0, 0); // Return false to prevent the submission handler from taking the lead to the follow up url form.getFormElem().after(html); return false; }); }); // ]]></script>
... View more