Skip to content

Instantly share code, notes, and snippets.

@ezos86
Last active August 29, 2015 14:11
Show Gist options
  • Save ezos86/3af2cf27826dd86efe71 to your computer and use it in GitHub Desktop.
Save ezos86/3af2cf27826dd86efe71 to your computer and use it in GitHub Desktop.
MARKETO MESSAGE AFTER FORM SUBMIT
<div class="message">Way to go...</div>
<script src="//app-ab08.marketo.com/js/forms2/js/forms2.js"></script>
<form id="mktoForm_1101"></form>
<script>
//MktoForms2.loadForm("//app-ab08.marketo.com", "229-XUE-318", 1101);
MktoForms2.loadForm("//app-ab08.marketo.com", "229-XUE-318", 1101, function(form){
//Add an onSuccess handler
form.onSuccess(function(values, followUpUrl){
//get the form's jQuery element and hide it
form.getFormElem().hide();
$('.message').show();
return false;
});
});
</script>

MARKETO MESSAGE AFTER FORM SUBMIT

Motha F**k annoying thing that works sometimes and doesn't others.. here is an example snippet for it.

REMEMBER: Wordpress = no spaces in javascript when adding.

A Pen by ezos86 on CodePen.

License.

.message{
display:none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment