Hey everyone,
We're working on a registration page that has checkboxes for customers to register for any of 4 webinars being offered over the next few months. I'd like to create a way in which the confirmation page would show each of the webinars they've registered for. We created a custom string field that holds 4 values, one for each of the webinar dates.
When a lead could potentially have multiple values for that field, will using the token for that field work to display multiple values?
Thanks for the help.
Hi Trask,
Yes it will (Separated with semicolons, if I remember well)
-Greg
EDIT: Woops, looks like I misunderstood your question. The below is more of an answer for displaying "your top 5 upcoming webinars" on a confirmation page.
You could sure (technically) do it via a lead field that concatenates the values together, then display the token onto the confirmation page.
----
Approach One, which doesn't work for very long.
Smart Campaign:
Trigger: Fills out registration form for webinar (this specific one)
Flow:
Change data value of "Z - Webinar Registrations" with two choices:
Then on the page, you could just throw out some CSS onto the page to format that however you want. Just define the program tokens for Webinar Date and Webinar Name on each program and make sure this a smart campaign that's turned on.
The annoyance is going to be that it'll grow infinitely and be impossible to prune based on dates. But something like this might directionally work. I think a safer route would be to combine this field concatenation on the Marketo back-end to output the names and dates of webinars that the lead is registered for, output it into a custom JavaScript snippet on the confirmation page, and use some logic and formatting through JavaScript to show those registrations on the page.
----
Approach Two, giving adequate information to be used in JavaScript on the page.
You could use Marketo smart campaigns to create a JSON object to be used in JavaScript on the page itself, which would look like a smart campaign like below.
Smart Campaign:
Trigger: Fills out registration form for webinar (this specific one)
Flow:
Change data value of "Z - Webinar Registrations" with two choices:
Then output that into JavaScript, with something like this:
<script>
var webinars = 'webinars: [{{lead.Z - Webinar Registrations}}]';
//Do other logic with that new JSON object, like make sure that you're taking the top 5 webinars that occur in the future and display them in a table via a loop
</script>
Note: I just hand-typed out all that code, so I'm reasonably confident that I screwed up somewhere by missing commas or otherwise.
Cheers,
Edward Unthank | Founder, Etumos
As Greg mentioned, when you use the Checkboxes display type with a Text database type, the selected values are stored semicolon-delimited in the database. So that token can be parsed in JS and output to the user.
But there are 2 catches:
If I did not know why we need to avoid multi valued fields, this bug is another good reason
-Greg
For sure. As with most things I discover, forget, and discover again, it's not well-known (which is my fault, really).