I have a set of tokens that sometimes has values in them, and sometimes not.

How can I send an email where labels only are visible when value is filled?

Example: I want to send an event registration confirmation letter. In the event signup form, I have several custom fields, that are stored in in the particiapant record.


Your info; Number of rooms: «tokenvalue.customfield1»

Example when token value is filled:

Your info; Number of rooms: 2

Desired behaviour when token value is not filled:

Your info;

Current behaviour when value is not filled:

Your info; Number of rooms:

Any tip or pointers are welcome!

1 Answer 1


If you look at the event confirmation template you'll see some sections with constructs like this:

{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}

You can edit the template and include something similar for your tokens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.