HiddenInputWidget
A hidden input: never shown, only carries a fixed value with the <form> on submit.
Basic usage
value is a controlled value (updated with the props) and name is the submitted field name. The demo below intercepts the submission and prints the fields — note that the disabled hidden field is left out.
Disabled
Unlike the original: the original's "disable" only toggles style classes and the hidden field is still submitted with the form; this implementation lands disabled on the native attribute, so a disabled field drops out of submission (as in the demo above). Pass disabled only when there is a submission scenario to block.
API
This component has no wrapper element: the component ref and props all land on the <input type="hidden"> itself.
See also
- The form container: FormLayout
- The value-channel contract: Controlled and uncontrolled