Skip to content

Instantly share code, notes, and snippets.

@nielsfogt
Created September 13, 2019 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nielsfogt/0151dbdb852a51e95d515a58552ae143 to your computer and use it in GitHub Desktop.
Save nielsfogt/0151dbdb852a51e95d515a58552ae143 to your computer and use it in GitHub Desktop.
<script>
// Ensure we only run our code if the forms MktoForms2 library is present:
if (MktoForms2) {
// When the form(s) are ready, .whenReady() set up the nested .onSuccess callback for each Marketo form on your page:
MktoForms2.whenReady(function(form) {
// When the form is submitted, .onSuccess runs the nested code:
form.onSuccess(function(vals) {
// We'll pass our form data to the Tray Platform here. More below!
});
return false;
});
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment