Skip to main content

Conditional Rendering

Conditional rendering is a way to render form items based on certain conditions.

The extensions that fall under this category are:

EnableWhen

The most basic way to use conditional rendering.

Basic usage

EnableBehavior

Used in tandem with enableWhen to provide more control over the behavior of the form item.

If set to "all", then the item will only be enabled if all the enableWhen conditions are met. If set to "any", the item will be enabled if any of the enableWhen conditions are met.

"all" usage

"any" usage

EnableWhenExpression

Allows more complex logic to be used for conditional rendering. Refer to the EnableWhenExpression section in the spec for more information.

EnableWhenExpressions are commonly used with variables.

Basic usage

Tabs usage