Skip to main content

Custom fields

The campaign custom fields are exposed in campaign.customfields.

{{ campaign.customfields['field-key'] }}

A missing key returns an empty string.

Presence and iteration:

{% if 'field-key' in campaign.customfields %}
{{ campaign.customfields['field-key'] }}
{% endif %}

{% for key, value in campaign.customfields %}
<li>{{ key }}: {{ value }}</li>
{% endfor %}

Methods: campaign.customfields.get('key'), .keys(), .values(), .items().

Values by field type​

TypeValue
Textstring
Flag"true" / "false"
Menuselected option (string)
DateISO date YYYY-MM-DD (string)

To show a date as DD/MM/YYYY use format_date:

{{ campaign.customfields['event-date'] | format_date }}   {# 28/07/2026 #}
note

All non-archived campaign custom fields are available in the theme and can end up on the public site. Do not use them for confidential data.