Show/hide conditions on form fields, including the shared {{ condition }} shape and each typed condition object.
Each form field has exactly one condition. That value is polymorphic: Liquid exposes it as {{ condition }}, but at runtime it is one of the typed condition objects on this page. Use object_type or type to tell which implementing type you have.
To combine tests, nest them in an and_condition or or_condition. Those groups hold a list of condition objects, and groups may nest.
{{ condition }} documents only the shared properties. Typed objects add the rest (field_id, value, invert, and so on). These are form-field show/hide conditions, not Liquid {% if %} operators — those stay on Conditions Overview.
{{ condition }}
{{ condition }} is the shared shape for a form field's show/hide rule. It is not a separate runtime type: each field has exactly one condition, and that value is one of the typed condition objects (eq_condition, and_condition, and the rest). Use object_type or type to tell which implementing type you have.
Typed condition objects add further properties that are not listed here (for example field_id, value, invert, or a nested conditions list). See each type on this page. Multiple tests are grouped with and_condition or or_condition; those groups may nest.
ExampleTell which typed condition a form field has{{ condition }} is polymorphic: check object_type to know which typed condition object you actually have before reading its extra properties.
Liquid
{%- if form_field.condition.object_type == "eq_condition" -%}
Visible when {{ form_field.condition.field_id }} equals "{{ form_field.condition.value }}"
{%- elsif form_field.condition.object_type == "and_condition" -%}
Visible when all {{ form_field.condition.conditions | size }} conditions are true
{%- else -%}
Visible based on a {{ form_field.condition.type }} condition
{%- endif -%}
{{ and_condition }}
A grouped form-field condition that is true when every nested condition is true.
The list of nested condition objects that must all be true. Each item is one of the typed {{ condition }} objects. Groups may nest and_condition and or_condition
ExampleTell which typed condition a form field has{{ condition }} is polymorphic: check object_type to know which typed condition object you actually have before reading its extra properties.
Liquid
{%- if form_field.condition.object_type == "eq_condition" -%}
Visible when {{ form_field.condition.field_id }} equals "{{ form_field.condition.value }}"
{%- elsif form_field.condition.object_type == "and_condition" -%}
Visible when all {{ form_field.condition.conditions | size }} conditions are true
{%- else -%}
Visible based on a {{ form_field.condition.type }} condition
{%- endif -%}
{{ contains_condition }}
A form-field condition that is true when a list field contains a given value.
ExampleShow text when a contains_condition matchescontains_condition tests whether a list field includes a given value; field_id names the list field, value is what to look for.
Liquid
{%- if form_field.condition.object_type == "contains_condition" -%}
Visible when {{ form_field.condition.field_id }} includes "{{ form_field.condition.value }}"
{%- endif -%}
{{ eq_condition }}
A form-field condition that is true when another field's value equals a given value.
ExampleTell which typed condition a form field has{{ condition }} is polymorphic: check object_type to know which typed condition object you actually have before reading its extra properties.
Liquid
{%- if form_field.condition.object_type == "eq_condition" -%}
Visible when {{ form_field.condition.field_id }} equals "{{ form_field.condition.value }}"
{%- elsif form_field.condition.object_type == "and_condition" -%}
Visible when all {{ form_field.condition.conditions | size }} conditions are true
{%- else -%}
Visible based on a {{ form_field.condition.type }} condition
{%- endif -%}
{{ exists_condition }}
A form-field condition that is true when another field has a value.
ExampleShow text when an exists_condition matchesexists_condition is true once another field has any value at all — it takes only field_id, no value to compare against.
Liquid
{%- if form_field.condition.object_type == "exists_condition" -%}
Visible once {{ form_field.condition.field_id }} has a value
{%- endif -%}
{{ gt_condition }}
A form-field condition that is true when another field's value is greater than a given value.
ExampleTell a strict threshold from an inclusive onegt_condition and gte_condition share field_id and value, but only gte_condition includes the boundary value itself — check object_type to know which you have.
Liquid
{%- if form_field.condition.object_type == "gt_condition" -%}
Visible when {{ form_field.condition.field_id }} is greater than {{ form_field.condition.value }}
{%- elsif form_field.condition.object_type == "gte_condition" -%}
Visible when {{ form_field.condition.field_id }} is {{ form_field.condition.value }} or greater
{%- endif -%}
{{ gte_condition }}
A form-field condition that is true when another field's value is greater than or equal to a given value.
ExampleTell a strict threshold from an inclusive onegt_condition and gte_condition share field_id and value, but only gte_condition includes the boundary value itself — check object_type to know which you have.
Liquid
{%- if form_field.condition.object_type == "gt_condition" -%}
Visible when {{ form_field.condition.field_id }} is greater than {{ form_field.condition.value }}
{%- elsif form_field.condition.object_type == "gte_condition" -%}
Visible when {{ form_field.condition.field_id }} is {{ form_field.condition.value }} or greater
{%- endif -%}
{{ in_condition }}
A form-field condition that is true when another field's value is one of a delimited list of values.
ExampleShow text when an in_condition matchesin_condition tests a field's value against a delimited list of candidates — value holds the raw delimited string, delimiter the separator.
Liquid
{%- if form_field.condition.object_type == "in_condition" -%}
Visible when {{ form_field.condition.field_id }} is one of "{{ form_field.condition.value }}" ({{ form_field.condition.delimiter }}-separated)
{%- endif -%}
{{ lt_condition }}
A form-field condition that is true when another field's value is less than a given value.
ExampleTell a strict threshold from an inclusive onelt_condition and lte_condition share field_id and value, but only lte_condition includes the boundary value itself — check object_type to know which you have.
Liquid
{%- if form_field.condition.object_type == "lt_condition" -%}
Visible when {{ form_field.condition.field_id }} is less than {{ form_field.condition.value }}
{%- elsif form_field.condition.object_type == "lte_condition" -%}
Visible when {{ form_field.condition.field_id }} is {{ form_field.condition.value }} or less
{%- endif -%}
{{ lte_condition }}
A form-field condition that is true when another field's value is less than or equal to a given value.
ExampleTell a strict threshold from an inclusive onelt_condition and lte_condition share field_id and value, but only lte_condition includes the boundary value itself — check object_type to know which you have.
Liquid
{%- if form_field.condition.object_type == "lt_condition" -%}
Visible when {{ form_field.condition.field_id }} is less than {{ form_field.condition.value }}
{%- elsif form_field.condition.object_type == "lte_condition" -%}
Visible when {{ form_field.condition.field_id }} is {{ form_field.condition.value }} or less
{%- endif -%}
{{ maxitems_condition }}
A form-field condition that is true when a list field has at most a given number of selected items.
ExampleRead a selection-count condition's limitmaxitems_condition and minitems_condition both count selections on a list field; value holds the limit, but which limit it is again depends on object_type.
Liquid
{%- if form_field.condition.object_type == "maxitems_condition" -%}
Visible while {{ form_field.condition.field_id }} has {{ form_field.condition.value }} or fewer selections
{%- elsif form_field.condition.object_type == "minitems_condition" -%}
Visible once {{ form_field.condition.field_id }} has {{ form_field.condition.value }} or more selections
{%- endif -%}
{{ mimic_condition }}
Reuses another field's show/hide condition so you do not have to redefine the same rule on every field.
mimic_condition lets you define a condition on a single field and apply that same rule to other fields without rewriting it. Liquid does not currently link to the referenced field; the template developer must look up that field and apply the result themselves.
ExampleShow text when a mimic_condition matchesmimic_condition reuses another field's own condition instead of restating the same rule — field_id names the field whose condition to copy, not a field to compare against.
Liquid
{%- if form_field.condition.object_type == "mimic_condition" -%}
Reuses the show/hide rule from {{ form_field.condition.field_id }}
{%- endif -%}
{{ minitems_condition }}
A form-field condition that is true when a list field has at least a given number of selected items.
ExampleRead a selection-count condition's limitmaxitems_condition and minitems_condition both count selections on a list field; value holds the limit, but which limit it is again depends on object_type.
Liquid
{%- if form_field.condition.object_type == "maxitems_condition" -%}
Visible while {{ form_field.condition.field_id }} has {{ form_field.condition.value }} or fewer selections
{%- elsif form_field.condition.object_type == "minitems_condition" -%}
Visible once {{ form_field.condition.field_id }} has {{ form_field.condition.value }} or more selections
{%- endif -%}
{{ or_condition }}
A grouped form-field condition that is true when any nested condition is true.
The list of nested condition objects. The group passes when any item is true. Each item is one of the typed {{ condition }} objects. Groups may nest and_condition and or_condition
ExampleCount how many nested conditions an or_condition groupsor_condition groups nested conditions the same way and_condition does, but passes when any one of them is true instead of requiring all of them.
Liquid
{%- if form_field.condition.object_type == "or_condition" -%}
Visible when any of {{ form_field.condition.conditions | size }} conditions is true
{%- endif -%}