Discovery: Provide way to make all form components contribute to form data (e.g., like readonly, not disabled)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !34742 (merged) should be addressed:
-
@markrian started a discussion: (+6 comments) question: Why aren't the other field types beneath this receiving the
disabledprop? I see they're receivingreadonly, via thesharedProps, butreadonlydoesn't have quite the same effect asdisabled:The difference between disabled and readonly is that read-only controls can still function and are still focusable, whereas disabled controls can not receive focus and are not submitted with the form and generally do not function as controls until they are enabled.
Because a disabled field cannot have it's value changed, required does not have any effect on inputs with the disabled attribute also specified. Additionally, since the elements become immutable, most other attributes, such as pattern, have no effect, until the control is enabled.
Textareas and text inputs understand
readonly, whereas others, like selects and radios and checkboxes do not, so you need to disable those and add hidden fields for them.