I am trying to show and hide the text using style attribute of html, but it is not hiding the text.

<p style="display:{!IF(Task.Description!='',' ','none')}"> Regarding {!Task.Description}, </p>

1 Answer 1


I believe you might not be using VisualForce email templates.

Try CASE tags instead of IF tag and it should work.

{!CASE(Task.Description, "", " ", "none")}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .