Embedded form success message after fill out | Community
Skip to main content
Kelly_Schmid3
Level 4
Aug 28, 2018 2:36 PM UTC
Solved

Embedded form success message after fill out

We are embedding a Marketo form on our website and would would like a success message instead of linking to another page.

When a user clicks "SUBMIT" on form can we stop the page from loading? How do we show a success message a under the email input box? If an user email address is already in the list, can we return a message letting them know this and a link to manage there preferences?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Avtar_Singh1
Avtar_Singh1Accepted solution
Level 2
Sep 5, 2018 8:30 AM UTC

Hi Kelly,

You can show the custom message on the form submission. You just need following basic javascript for the same:

form.onSuccess(function(values, followUpUrl) {

form.getFormElem().html("Thanks for Registering!<br />You'll be hearing from us soon.");

form.getFormElem().css("text-align","center");

form.getFormElem().css("font-family","'GalanoGrotesque-Regular'");

return false;

});

To show success message underneath email input you can use jquery insertAfter selector.

Best Regards,

Avtar Singh

6 replies

Avtar_Singh1
Avtar_Singh1Accepted solution
Level 2
Sep 5, 2018 8:30 AM UTC

Hi Kelly,

You can show the custom message on the form submission. You just need following basic javascript for the same:

form.onSuccess(function(values, followUpUrl) {

form.getFormElem().html("Thanks for Registering!<br />You'll be hearing from us soon.");

form.getFormElem().css("text-align","center");

form.getFormElem().css("font-family","'GalanoGrotesque-Regular'");

return false;

});

To show success message underneath email input you can use jquery insertAfter selector.

Best Regards,

Avtar Singh

Translate
SanfordWhiteman
Level 10
Sep 5, 2018 5:05 PM UTC

When posting code, please highlight it using the Advanced Editor's syntax highlighter so it's readable:

https://s3.amazonaws.com/blog-images-teknkl-com/syntax_highlighter.gif

Translate
SanfordWhiteman
Level 10
Aug 28, 2018 2:55 PM UTC

Have you searched for the first 2 questions? There are myriad examples of using Thank You text/Thank You DIVs here on the Community.

The question of identifying whether a lead is in a given list has come up several times, too. Search for "lead lookup form."

Translate