Velocity Email Script Token for Checkboxes
I am trying to create an email script token for a program with the following workflow:
-A checkbox is selected in the Exosome Brochure Downloads field on form FM 01
-That selection is inserted into the email that sends out after the form fill
I would like the customer to be able to select multiple check boxes and have only those selections appear in the email. For example, if the customer selects B1, only B1 will show up in the email. But if they select B1 and B2, then both selections will show in the email.
I am using the code below but both options show on the email regardless of which box is checked in the form. Any advice is appreciated.
#set($lead.exosomeBrochureDownloads = "B1,B2")
#if( !$lead.exosomeBrochureDownloadsS.isEmpty()&&$lead.exosomeBrochureDownloads.contains("B1") ) <a href="https://www.bio-techne.com/">Get B1 Brochure<br></a>
#end
#if(!$lead.exosomeBrochureDownloadsS.isEmpty()&&$lead.exosomeBrochureDownloads.contains("B2") ) <a href="https://www.bio-techne.com/">Get B2 Brochure</a>
#end