Listing the multiple webinars a lead registers for on a confirmation page

Anonymous
Not applicable

Listing the multiple webinars a lead registers for on a confirmation page

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.

5 REPLIES 5
Grégoire_Miche2
Level 10

Re: Listing the multiple webinars a lead registers for on a confirmation page

Hi Trask,

Yes it will (Separated with semicolons, if I remember well)

-Greg

Edward_Unthank_
Level 10

Re: Listing the multiple webinars a lead registers for on a confirmation page

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:

  1. IF "Z - Webinar Registrations" is empty, then new value is:
    • <div class="webinar-item"><span class="webinar-name">{{my.Webinar Name}}: </span><span class="webinar-date">{{my.Webinar Date}}</span></div>
  2. IF "Z - Webinar Registrations" is not empty, then new value is:
    • {{lead.Z - Webinar Registrations}}<br><div class="webinar-item"><span class="webinar-name">{{my.Webinar Name}}: </span><span class="webinar-date">{{my.Webinar Date}}</span></div>

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:

  1. IF "Z - Webinar Registrations" is empty, then new value is:
    • {"webinar-name": "{{my.Webinar Name}}","webinar-date": "{{my.Webinar Date}}"}
  2. IF "Z - Webinar Registrations" is not empty, then new value is:
    • {{lead.Z - Webinar Registrations}},{"webinar-name": "{{my.Webinar Name}}","webinar-date": "{{my.Webinar Date}}"}

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.

Sanford Whiteman

Cheers,

Edward Unthank | Founder, Etumos

SanfordWhiteman
Level 10 - Community Moderator

Re: Listing the multiple webinars a lead registers for on a confirmation page

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:

  1. It's the values (i.e. "server value") that are stored, not the display names.  So if you want to display the event name to the user as it was originally presented on the form, you might think about displaying a read-only version of the form to them, rather than new HTML with the token.  By using a form you get the token parser built-in, plus the values will be reversed back to the display names automatically.
  2. There's a bug in clearing the field (i.e. deselecting all webinars).  If you simply clear all checkbox options, the database field will not be cleared accordingly. To clear the db field, you must have an additional hidden checkbox whose value is NULL. Then you can set the field to NULL on submit (using form.setValues).. Annoying, but it's necessary so attempts to withdraw registration will be honored instead of ignored!
Grégoire_Miche2
Level 10

Re: Listing the multiple webinars a lead registers for on a confirmation page

If I did not know why we need to avoid multi valued fields, this bug is another good reason

-Greg

SanfordWhiteman
Level 10 - Community Moderator

Re: Listing the multiple webinars a lead registers for on a confirmation page

For sure.  As with most things I discover, forget, and discover again, it's not well-known (which is my fault, really).