Embedded form success message after fill out | Community
Skip to main content
Kelly_Schmid3
New Participant
August 28, 2018
Solved

Embedded form success message after fill out

  • August 28, 2018
  • 2 replies
  • 11033 views

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.
Best answer by Avtar_Singh1

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

2 replies

Avtar_Singh1
Avtar_Singh1Accepted solution
New Participant
September 5, 2018

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

SanfordWhiteman
New Participant
September 5, 2018

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

SanfordWhiteman
New Participant
August 28, 2018

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