Assigning a unique confirmation number for form submissions

Ellen_Albright
Level 2

Assigning a unique confirmation number for form submissions

I would like to use a Marketo form as a service request form on a Marketo landing page. I would like each form submission to have a unique ticket number/confirmation number assigned to it that can then be included in a confirmation email sent to the requestor. Keep in mind, it is possible the same person will submit the form multiple times so the Lead ID cannot be used as the reference number. 

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Assigning a unique confirmation number for form submissions

The problem is that no form field is prohibited from being overwritten by the next form post.


So I can tell you that this will generate an airline-type confirmation (XYZPDF) in the field LastConfirmationCode:

MktoForms2.whenReady(function(form){
form.addHiddenFields({
LastConfirmationCode : new Date().getTime().toString(36).toUpperCase()
});
});

And you could send someone {{lead.Marketo Unique Code}}-{{lead.LastConfirmationCode}} which will look professional.

But you would have to add this to a history field for it not to be gone on the next form fill. And it doesn't really contain the context of the other fields from the form fillout unless you also put those in the history field.