Skip to content

Instantly share code, notes, and snippets.

@msure
Created July 22, 2016 19:27
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 msure/857215ef1983dcd634d10c4a4fd32931 to your computer and use it in GitHub Desktop.
Save msure/857215ef1983dcd634d10c4a4fd32931 to your computer and use it in GitHub Desktop.
Example of How To Grab Marketo Form Values On Submission
MktoForms2.loadForm("//app-sjst.marketo.com", "785-UHP-775", 1057, function(form) {
// Add an onSubmit handler
form.onSubmit(function(){
// Get the form field values
var vals = form.vals();
// You may wish to call other function calls here, for example to fire google analytics tracking or the like
// callSomeFunction(vals);
// We'll just alert them to show the principle
alert("Submitted values: " + JSON.stringify(vals));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment