You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -689,11 +689,13 @@ In the future, new widgets wrapping such explicit use case can be added.
689
689
690
690
## Hiding Fields
691
691
692
-
Fields can be hidden from the form display while still maintaining their widget functionality and participating in form submission using the `"ui:hidden": true` property.
692
+
Fields can be hidden from the form display while still maintaining their widget functionality and participating in form submission using the `ui:hidden` property. The `ui:hidden` property supports two modes: **static** and **conditional (dynamic)** hiding.
693
693
694
-
This is different from `"ui:widget": "hidden"` which changes the widget type itself. With `"ui:hidden": true`, the field keeps its original widget type (like `ActiveText`, `ActiveTextInput`, etc.) but is visually hidden from the user.
694
+
This is different from `"ui:widget": "hidden"` which changes the widget type itself. With `ui:hidden`, the field keeps its original widget type (like `ActiveText`, `ActiveTextInput`, etc.) but is visually hidden from the user.
695
695
696
-
### Example Usage
696
+
### Static Hiding
697
+
698
+
Hide a field permanently using a boolean value:
697
699
698
700
```json
699
701
{
@@ -705,34 +707,240 @@ This is different from `"ui:widget": "hidden"` which changes the widget type its
705
707
"ui:props": {
706
708
"ui:text": "This text is hidden but still rendered"
707
709
}
710
+
}
711
+
}
712
+
```
713
+
714
+
### Conditional (Dynamic) Hiding
715
+
716
+
Hide fields based on the values of other form fields using condition objects:
|`"ui:widget": "hidden"`| Changes widget type to hidden input | Simple hidden form values |
723
924
|`"ui:hidden": true`| Keeps original widget but hides it visually | Hide widgets while preserving their functionality (e.g., ActiveText that fetches data) |
925
+
|`"ui:hidden": {...}`| Conditionally hides based on form data | Dynamic forms that adapt to user input |
926
+
927
+
### Behavior of Hidden Fields
928
+
929
+
Hidden fields (regardless of hiding method):
930
+
931
+
-**Are not displayed** in the form
932
+
-**Are not shown** in the wizard stepper navigation (multi-step forms)
933
+
-**Still participate** in form validation
934
+
-**Are included** in form submission
935
+
-**Are excluded** from the review page (but will still be part of the request payload)
936
+
-**Maintain their widget functionality** (fetching, validation, etc.)
937
+
-**Update in real-time** when form data changes (for conditional hiding)
724
938
725
-
Hidden fields:
939
+
> **Note:**Hidden fields are not displayed on the review page for clarity, but they are still included in the workflow execution request. If you need to completely exclude fields from the request payload, you can use the [`SchemaUpdater` API](./extensibleForm.md#schema-updater) to dynamically modify the schema.
726
940
727
-
- Are not displayed in the form
728
-
- Are not shown in the wizard stepper navigation (multi-step forms)
729
-
- Still participate in form validation
730
-
- Are included in form submission
731
-
- Are excluded from the review page
732
-
- Maintain their widget functionality (fetching, validation, etc.)
941
+
### Automatic Step Hiding
733
942
734
-
**Automatic Step Hiding:**
735
-
If all inputs within a multi-step form's step are marked with `"ui:hidden": true`, the entire step will be automatically hidden from the stepper navigation. The step and its hidden fields will still be processed during form submission.
943
+
If all inputs within a multi-step form's step are marked with `ui:hidden` (either statically or dynamically), the entire step will be automatically hidden from the stepper navigation. The step and its hidden fields will still be processed during form submission.
0 commit comments