Variable form fields based on... | Community
Skip to main content
Dan_Askin
Level 4
May 4, 2016
Question

Variable form fields based on...

  • May 4, 2016
  • 1 reply
  • 2264 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
May 4, 2016

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
Dan_AskinAuthor
Level 4
May 5, 2016

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.

May 5, 2016

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