#if( ${lead.mktohidden}.equals("21Q2-abc-form") )
#set($abc_form.equals ("Thank you for submitting your brand for consideration for our ABC Campaign. "))
#else
#set($abc_form.equals (""))
#end
Solved! Go to Solution.
In Velocity, everything that's outside of a #directive is automatically output.
So you're overcomplicating things (and there's also a syntax error, but we can resolve that by not having any special syntax at all).
All you need is:
#if( $lead.mktohiddenadminstring1.equals("21Q2-incentive-form") )
Thank you for submitting your brand for consideration for our Growth Spurt Campaign.
#end
If the condition doesn't match, there's no output.
Also, is there a way I can control the formatting of this sentence, such as font, size...
Certainly. You can output HTML tags and styles, Velocity just outputs whatever you tell it to:
#if( $lead.mktohiddenadminstring1.equals("21Q2-incentive-form") )
Thank you for submitting your brand for consideration for our <strong>Growth Spurt Campaign.</strong>.
#end
In Velocity, everything that's outside of a #directive is automatically output.
So you're overcomplicating things (and there's also a syntax error, but we can resolve that by not having any special syntax at all).
All you need is:
#if( $lead.mktohiddenadminstring1.equals("21Q2-incentive-form") )
Thank you for submitting your brand for consideration for our Growth Spurt Campaign.
#end
If the condition doesn't match, there's no output.
Also, is there a way I can control the formatting of this sentence, such as font, size...
Certainly. You can output HTML tags and styles, Velocity just outputs whatever you tell it to:
#if( $lead.mktohiddenadminstring1.equals("21Q2-incentive-form") )
Thank you for submitting your brand for consideration for our <strong>Growth Spurt Campaign.</strong>.
#end
Thank you @SanfordWhiteman - I have used the code you sent, and I still hit an error: "Cannot get email content- A newline character is expected at the end of Email Script". Do you know what that is referring to?
Means you need a line break after the #end directive.
Ah, thank you! Much appreciated 😄 This community is so blessed to have you!