14 Replies Latest reply on Mar 16, 2017 10:49 AM by Sanford Whiteman

    Suppress default text in auto-response email

    Casler Nancy (Nancy)

      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?

        • Re: Suppress default text in auto-response email
          Sanford Whiteman

          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!

          • Re: Suppress default text in auto-response email
            Sanford Whiteman

            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

              • Re: Suppress default text in auto-response email
                Casler Nancy (Nancy)

                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!

                  • Re: Suppress default text in auto-response email
                    Sanford Whiteman

                    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).

                      • Re: Suppress default text in auto-response email
                        Casler Nancy (Nancy)

                        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

                          • Re: Suppress default text in auto-response email
                            Casler Nancy (Nancy)

                            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