Skip to content

Instantly share code, notes, and snippets.

@cougrimes
Last active August 29, 2015 14:24
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 cougrimes/5b6bfa4802fc20df4044 to your computer and use it in GitHub Desktop.
Save cougrimes/5b6bfa4802fc20df4044 to your computer and use it in GitHub Desktop.
Capture Marketo name values in alternate field in addition to primary (for allowing field-level block recordings.)
MktoForms2.loadForm("//app-xxx.marketo.com", "###-###-###", 1234, function (form) {
var vals = form.vals();
form.onValidate(function() {
if mktoPreFillFields.FirstName != vals.First || mkto.PreFillFields.LastName != vals.Last {
form.vals({"alternateFirst":vals.First, "alternateLast":vals.Last});
};
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment