Get lead id on success event of marketo form
<script>
MktoForms2.loadForm("//app-sj07.marketo.com", "11-11-11", 12, function(form) {
// Add an onSubmit handler
form.onSuccess(function(){
// Get the form field values
var vals = form.vals();
alert("Submitted values: " + JSON.stringify(vals));
});
});
</script>
Hi Mayank,
Place the {{lead.ID}} token in your page, in a hidden position, then use Javascript to collect the value and pass it to your script.
-Greg
Is this a question or a statement? Obviously, your code does not work. Unfortunately, Greg's pointer won't work reliably either. I've explained this in other posts. Please search for them and/or provide more explanation in your questions.