Pop-up Follow-up instead of redirect to a landing page | Community
Skip to main content
October 12, 2014
Duplicate

Pop-up Follow-up instead of redirect to a landing page

  • October 12, 2014
  • 4 replies
  • 1958 views
I want to be able to have a pop-up message appear after someone subscribes to my newsletter.

Signing up to a newsletter doesn't warrant a redirect to a landing page to say "thanks for subscribing" a simple message displayed where the user entered their email address is all I want. [Without having to customise and build workarounds] 

4 replies

New Participant
February 7, 2020
No text available
Kenny_Elkington
New Participant
October 14, 2014
Hi Julia,

This script needs to be placed somewhere after the form embed code.  As far as adding it to your page, that's dependent on what CMS or hosting that you use.  I'd suggest searching for  something along the line of 'how to add a script to a page in [my CMS software]' for instructions on how to do that.
May 21, 2015

Thank you! 

October 14, 2014
Thanks Kenny!
So where do I put this javascript exactly? 
This form is going to be embedded on a non-marketo page, can you give me a step by step guide please of how this would work exactly.

Thank you!
Kenny_Elkington
New Participant
October 13, 2014
Hi Julia,

This is a great idea for a feature enhancement.  For now you can do this via the forms 2 API, however.  This example code will replace your form with HTML content of you choosing when it submits successfully:

<script>
MktoForms2.whenReady( function(form) {
	form.onSuccess ( function (values, followUpUrl){
		return false;
		$(".mktoForm").replaceWith('<div><p>Enter Whatever HTML Content you want here</p></div>');//you can also submit a DOM object in the replaceWith method
		});
	});
</script>


June 26, 2015

Oh awesome, thanks!! I'll give it a go