Created
July 22, 2016 19:27
-
-
Save msure/857215ef1983dcd634d10c4a4fd32931 to your computer and use it in GitHub Desktop.
Example of How To Grab Marketo Form Values On Submission
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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