Variable form fields based on...

Dan_Askin
Level 4

Variable form fields based on...

We're trying to set up a form where paid members can invite folks to gain limited partner access. The # of invitations each can make is dependent upon their membership tier. So balsawood members can invite 1 person, pewter 3, titanium 7, platinum 33, and mars rock 49. Assuming this is a Forms 2.0 JS thing that's not all that difficult to set up, but curious if there are other hack-y means of deployment.

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Variable form fields based on...

My question is how you plan to store 49 email addresses on the lead. If you were going to create 49 custom fields (ugh) then you could use Visibility Rules.

I would instead recommend a single field on the Marketo side. Store a comma-delimited list of addresses or (more technical, and my prefernece) a JSON array.

To the user, you present a set of email input fields. These could be in a Rich Text field: you could have all 49 in there and show/hide each tier's max using CSS, or use some JS to let the user "add more" up to the max for their tier, adding 5 at a time or what-have-you.

Dan_Askin
Level 4

Re: Variable form fields based on...

Thanks for your response, Sanford. We may associate the refer-ee with the referrer rather than the other way around. Or we may just say you can invite up to X people and hope that they don't get greedy. This whole project needs some serious data architecture.

Anonymous
Not applicable

Re: Variable form fields based on...

Hi Dan,

In that case, you might need a few things. See if the following approach works for you.

1> Web form with Forms 2.0 Javascript as Sanford mentioned here. Adding javascript code to limit number of referral email addresses an user can provide based on their 'tier'. May be a single text area field which will ask for 1 email address on each line.

You can then store this information on a Marketo lead field.

2> When this form is filled, you might call a web hook with lead email and this comma separated values of referrals. This web hook then will use 'import lead' API call Import Lead » Marketo Developers

to import these referrals in Marketo.

You might have to construct JSON from the referral email addresses text field entered by the user among other things.

You can pass the 'referrer' information on a field on these new leads Marketo record based on who referred that lead.

3> Depending on your load / urgency to create these leads in Marketo, you can also have the web hook simply dump the referrals in a staging table and have a separate server based process to 'process' 'a day's referrals' nightly.

Hope this helps

Rajesh Talele

Dan_Askin
Level 4

Re: Variable form fields based on...

The process is coalescing, and we're actually looking to outsource the form work/some of the marketo data structuring -- if anyone knows anyone. Also, I'm being a bit ambiguous because the project hasn't been announced yet.

1) In an email, we ask account holders to invite friends via a Marketo form.

  • Form fields = name + email address
  • Bonus option to invite your share partners from Facebook
  • # of invites is based on tier. Threw out the 49 as an example; it'll probably be 2-10.

2) Upon form submission (button click), the following occurs:

  • Name-email combos are passed to our 3rd party log-in software via API/Webhook -- this pre-approves the 'partners' to log in w/ their email address
  • Name-email are held in Marketo, where we check to see if the user is new or existing.
    • Marketo auto-syncs with our CRM -- which we don't want in this case -- because but these names are not necessarily new. If fact, many are probably existing. So we don't want to create new records before checking.
      • Yes = update their 'account holder #' attribute; to Sanford's point, not quite sure if we need to make the association from account holder to share partners (in which case Bill the account holder, could have 10 linked emails) vs. the other way around (each of the 10 email address have Bob's account #)
      • No = create a new unmailable record
      • Possible that account holders will invite the same people, in which case the most recent account holder # would overwrite (or we'd store all account holder #s within the one field)
  • The submit button click also triggers an email inviting the partners to log in -- allowing for sufficient time for the 3rd-party log-in software to process (pre-approve) the data.
    • If they click the sign-up button in the email, they become mailable (it's messaged as a benefit)

3) We want additional info on the share partners -- if we don't have it already -- so the invite email will take them to a second form asking them for phone #, zip code and DOB

  • Upon completion of the second form, they'll be directed to the 3rd-party log-in page

Dan

Dan_Askin
Level 4

Re: Variable form fields based on...

Not sure how to edit ... or if I can ... but the account holder's name should only be Bill (or Bob).