Skip to main content
Kelly_Schmid3
Level 4
August 28, 2018
解決済み

Embedded form success message after fill out

  • August 28, 2018
  • 6 の返信
  • 11098 ビュー

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?

このトピックへの返信は締め切られました。
ベストアンサー 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

6 の返信

SanfordWhiteman
Level 10
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."

Avtar_Singh1
Level 2
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
Level 10
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