how can i get more than one email from customers

Anonymous
Not applicable

how can i get more than one email from customers

I am running a contest landing page. If the person entering adds a co workers email and name the get to double their entry. How can I collect this information using tokens.

Thank you

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: how can i get more than one email from customers

Devin, it sounds like you're talking about a variant of the Referral Form paradigm, where we want both the referrer and the referral to become new leads. This is simple if you know a bit of JavaScript, since you can use the Forms 2.0 API.

Add to the form both the standard Email field and a new custom field called something like LastReferralEmail.

Then, in the form's onSubmit function, check if the person entered a value in LastReferralEmail:

  • if they left LastReferralEmail empty, don't do anything and just let the form submit
  • if they filled out LastReferralEmail, then store the Email value to a temporary var and set Email = LastReferralEmail*, then let the form submit
  • in the onSuccess function, if there was a stored value for Email, switch back to that stored value** and call form.submit()
  • make sure to defuse any infinite loops!

Note the reason we do it in referral, referrer order -- which might seem sort of reversed -- is to make sure the last associated lead will be the referrer (i.e. the human filling out the form).  There are other ways to deal with that concern that are more elegant but also require more code.

The sum of what you're doing is 2 form submissions, one for each lead.

P.S. I don't think you want to use the term "token" here.  You mean simply fields on the lead.  Those fields in turn can be used as tokens like {{Lead.Field Name}}  but at the time of collection/creation they are called fields.

* form.setValues({Email:form.getValues().LastReferralEmail)}

** form.setValues({Email:savedEmail})

Sanford Whiteman, Chief Technologist
FigureOne, Inc. Professional Services
sandy@figureone.com