Skip to main content

Disabled

We can mark a field as disabled, the user cannot edit the field"s value. The field will also be disabled visually.

Non-dynamic disabled value

A simple way to mark a field as disabled, is just to set disabled: true to the field.

{
"component": "text",
"label": "Name",
"disabled": true
}

Complex condition for disabled

We can also mark a field based on other field value. For this, the disabled properties accepts an array of condition definied in the Conditions section, except that for in this case, the condition does not require a message property (as it will never be shown in disabled case). Also, in disabled case, the property must be defined.

{
"component": "text",
"label": "Name",
"disabled": [
{
"property": "disable_name",
"assertion": "isTrue"
}
]
}