Display a field only if it matches a condition

Adding conditions to fields

If you want to hide or show a field on your pass based on a certain condition, you can specify such a condition by using the syntax explained below.

To add a condition, click on “Extended options” when editing a field using the template editor in gifttowallet.

Conditions are fault tolerant to a certain degree. E.g. it doesn’t matter if you add whitespaces after the comparison operator or not or if you enclose a string in double or single quotes. Currently only one condition can be added which means it’s not possible to use “or” conditions.

Show a field if a certain additional property is not empty

To make sure a field is only added to the pass if it contains a value (which means it’s not empty), just enter the placeholder of the additional property in the condition field.




Entering the placeholder only is the same as comparing it to an empty string:

{Fieldname} != ''

Show a field if an additional property has a certain value

If you only want to display a field on your pass if an additional property contains a specific value, e.g. if the level of a user is “Silver”, you can add the following condition:
{Level} == 'Silver'

Show a field if it does not match a certain value

If you only want to display a field if an additional property does not match a specific value, add a condition like the following:
{Level} != 'Silver'
This is the same as
{Level} <> 'Silver'