Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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