Conditions
Fields can derive state from current form values:
{ id: "details", kind: "text", label: "Details", hiddenWhen: { kind: "field-value", field: "include_details", notEquals: true }}Supported condition kinds:
| Kind | Use |
|---|---|
field-value |
Compare one field with literals, ranges, sets, or empty/truthy state. |
field-comparison |
Compare two fields with eq, neq, gt, gte, lt, or lte. |
form-operation |
React to idle, validating, or submitting. |
submission-status |
React to idle, succeeded, failed, or aborted. |
submit-count |
React to submit count. |
all, any, not |
Compose other conditions. |
Declarative field references use the same normalized ids as field definitions. For example,
"Include Details" resolves to include-details. Schema normalization rejects a reference that
does not resolve to a declared field, including references nested inside all, any, or not.
Function conditions are runtime code and therefore cannot be checked for references during schema
normalization.
Function conditions receive the same two axes as formOperation and submissionStatus.
Conditional state does not depend on field declaration order. When reset-on-hide changes a value
that another field reads, the runtime re-evaluates the affected state until the form is stable.