SOLVED

Tokenizing Picklists?

Go to solution
Anonymous
Not applicable

Greetings, Marketo Community,

As our office continues to build out our landing pages and forms, we are struggling to keep our product (in this case, degree programs at a university) picklist up to date. Currently, we have over 30 picklist options for programs within our forms.

Is there a way to create a token - universal or at the folder level - that will allow for easy picklist updating when new programs are added, program names are changed, etc?

Thanks in advance,

Matt

Tags (2)
1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

JS if looks like this:

if( condition ) {
  // do something
}

 

Therefore you could use your {{my.token}}, provided the value is allowed within a JS double-quoted string:

if( "{{my.program_language}}" == "English" ) {
  // do something
}

 

However I’d be very unlikely to do it this way. It’s always better to keep JS code out of your LPs and templates.

 

Instead, store the code in a separate .js file you put in Design Studio. Include a different src based on the {{my.token}}, as shown in my earlier post.

View solution in original post

12 REPLIES 12