If a user fills out a form but does not select a checkbox in my form, is there a way to prevent that lack of response from being recorded in my response email? I have a token pulling a checkbox field from my form, but if you don't check it, the word "no" shows up in my confirmation email. Is there a way to prevent that?
Solved! Go to Solution.
I tried to make this work, to no avail so far. The multi-checkbox field I'm trying to call is company.Comments. I modified your suggested script as follows, created an email script token, and pulled it into my response email. So far, nothing at all displays (neither my selected choices, nor the "You checked off..." text) after I fill out the form and receive the response email. Here's what I'm using:
#set( $singleInterests = $company.Comments.split(";") )
#if( $singleInterests.size() )
You checked off the following interests:
#foreach( $singleInterest in $singleInterests )
${singleInterest}
#end
#end
I'm not clear on how $singleInterest is being defined, as opposed to it's plural version. Am I missing something there, do you think?
You're right, this is heading into the category of programming
Please move the thread to Products and I'll pick up over there.
"Community" is for website feedback, not support -- and yes, this is confusing!
Thanks, I figured that out after I posted. I would appreciate your help!
Meaning, I figured out I posted in the wrong spot, not how to suppress default text
OK! This is a great fit for an Email Script token. Conditional output is easy to do:
#if( $lead.someBooleanField == "1" )
You answered "Yes" to this question.
#end
Is there a good article on how email scripts work? I found a couple of links to information, but both go to a dead end. I haven't done this before and am not a programmer. I basically have a list of separate checkbox fields (each a separate field), and if a person doesn't check one or more of the boxes, we don't want anything at all to get written to the email for the unchecked boxes (we need them to be separate fields so that they don't get written to the email as a semi-colon separated running list as you get with a single "checkboxes" field). Can a script hide an unchecked choice entirely in the email, so that there wouldn't be an extra line break for the checkbox answers where there is no response? This is not easy to describe!
Is there a good article on how email scripts work? I found a couple of links to information, but both go to a dead end.
I have to recommend my posts on Velocity. They're pretty much the only 3rd-party info on Marketo & Velocity working together.
In fairness, they aren't aimed at a non-programmer who doesn't want to become a programmer of sorts.
(we need them to be separate fields so that they don't get written to the email as a semi-colon separated running list as you get with a single "checkboxes" field). Can a script hide an unchecked choice entirely in the email, so that there wouldn't be an extra line break for the checkbox answers where there is no response? This is not easy to describe!
You actually don't need to use individual fields, since Velocity can separate the semicolon-delimited lists easily into multiple values:
Take a multi-select field called multipleInterestField which could have values like:
apple;pear
orange
orange;pear
You can display only the interests they've checked off like so:
#set( $singleInterests = $lead.multipleInterestField.split(";") )
#if( $singleInterests.size() )
You checked off the following interests:
#foreach( $singleInterest in $singleInterests )
${singleInterest}
#end
#end
And if they have no interests, nothing is displayed, not even the "You checked off..." title (because we check the size of the list first).
OK, thank you so much! I'm going to read your posts and see if I can figure out making it work on my project. Interesting that I used apple, pear, banana and grapes for my test choices
I tried to make this work, to no avail so far. The multi-checkbox field I'm trying to call is company.Comments. I modified your suggested script as follows, created an email script token, and pulled it into my response email. So far, nothing at all displays (neither my selected choices, nor the "You checked off..." text) after I fill out the form and receive the response email. Here's what I'm using:
#set( $singleInterests = $company.Comments.split(";") )
#if( $singleInterests.size() )
You checked off the following interests:
#foreach( $singleInterest in $singleInterests )
${singleInterest}
#end
#end
I'm not clear on how $singleInterest is being defined, as opposed to it's plural version. Am I missing something there, do you think?
You're right, this is heading into the category of programming
Did you check of Lead.Comments in the right-hand-side tree in the Email Script Editor? Have to do that for any property (i.e. lead field) to exist in Velocity.