I'm using variables in my notification template. This works great when a use enters a value for that field in the form. The token {name} is replaced with the value the user entered in the text input.

But when the user doesn't enter a value in the form field the token is printed in the email. {name}

I was expecting either a form value or nothing to be printed to the email notification.

Is there a way to configure this? My notifications are full of tokens that I'd like to only if print the user entered the matching field value.


1 Answer 1


Notifications use conditionals the same way as within a template tag. to use {name} as an example, you would do the following:

{if name}{name}{/if}

This would show the value if one was entered and be disregarded if the field was left blank. However, you might want to also include a label.

{if name}Name: {name}{/if}

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.