Conditional Fields
Fields can be hidden globally or shown conditionally.
Hidden fields
TS
{
name: "internalId",
type: "hidden",
hidden: true
}hidden: true prevents the field from rendering and excludes it from mapped form values.
Mode-based hiding
TS
{
name: "password",
type: "password",
createValueMode: "empty",
editValueMode: "hidden"
}editValueMode: "hidden" hides the field during edit mode.
TS
{
name: "createdBy",
type: "hidden",
createValueMode: "hidden"
}createValueMode: "hidden" hides the field during create mode.
visibleWhen
TS
{
name: "suspensionReason",
label: "Suspension reason",
type: "textarea",
visibleWhen: {
key: "status",
operator: "equals",
value: "suspended"
}
}The field renders only when the condition is true.
Supported condition operators
| Operator | Meaning |
|---|---|
equals | Value equals expected value. |
notEquals | Value does not equal expected value. |
contains | Value contains expected value. |
notContains | Value does not contain expected value. |
exists | Value exists. |
notExists | Value does not exist. |
in | Value is in expected array. |
notIn | Value is not in expected array. |
gt | Greater than. |
gte | Greater than or equal. |
lt | Less than. |
lte | Less than or equal. |
Validation and visibility
Hidden or not-visible fields are skipped by validation.