Velocity script email token issue
I'm working with a script that pulls checkbox responses from a form field to a response email through an email script token. Script is as follows:
#set( $singleInterests = $lead.documentsDigital.split(";") )
#if( $singleInterests.size() )
#foreach( $singleInterest in $singleInterests )
## ${singleInterest}
<a href="info.gepower.com/rs/232-DKG-508/images/${singleInterest}">${singleInterest}</a><br>
#end
#end
I have 4 other fields and created another script for each in the same token that is structured just like the one above, but with the field name changed. I'm getting some weird behavior...when I test, the response email contains links to documents that I did not check. I tried putting all 5 fields into one script, but I don't think I have the syntax right.
Here's what I tried:
#set( $singleInterests = $lead.documentsDigital.split + $lead.documentsServiceAgreements.split + $lead.documentsUpgrades.split + $lead.documentsServiceCenter.split + $lead.documentsGenerator.split (";"))
Any suggestions would be greatly appreciated!