Re: Advanced dynamic content

Anonymous
Not applicable

Advanced dynamic content

Question regarding this topic: https://nation.marketo.com/blogs/marketowhisperer/2016/08/14/velocity-script-tokens-as-an-alternativ...     

How would the code/approach change if all the information would be stored in one, not separate fields in Marketo?  

For example - I have a form in a landing page where people have to select their pet preferences (bird, cat, dog, pig) and they can select multiple pets. My goal would then be to send them a thank you email mentioning their pet and giving link for additional information.  

I tried making segments and added dynamic content to the email template, but that approach seems to not really work if there are several values/ifs.  

As far as I know - it's not also possible to edit the Marketo Form field that each checkbox/answer goes to a separate field in Marketo database - all the selected information can go to one particular field, not several.  So I guess the only way would be this approach described here only changing the code slightly? Switching from "=="to "contains"?

Sanford Whiteman

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Advanced dynamic content

As far as I know - it's not also possible to edit the Marketo Form field that each checkbox/answer goes to a separate field in Marketo database - all the selected information can go to one particular field, not several.

Depends on how you construct the form.

Individual Checkbox fields can certainly post to individual fields... that's what they're for.

You can also have single Checkboxes widget that spreads its answers out across multiple fields, though you need JS to make that happen.

How would the code/approach change if all the information would be stored in one, not separate fields in Marketo?

If you're using a semicolon-delimited field, add the values to a list and then you can use the handy .contains():

#set( $indivValues = [] )

#foreach( $value in $lead.multiValuedField.split(";") )

#set( $tmp = $indivValues.add($value) )

#end

#if( $indivValues.contains("bird") )

bird is in the building

#end