-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Prerequisites
- I have searched the existing issues
- I understand that providing a SSCCE example is tremendously useful to the maintainers.
- I have read the documentation
- Ideally, I'm providing a sample JSFiddle, Codesandbox.io or preferably a shared playground link demonstrating the issue.
What theme are you using?
core
Version
5.22.0
Current Behavior
The recent implementation of prefilled, readonly fields for const values, introduced by #4326, has led to a regression impacting various use cases.
In my opinion, this change is a regression as it alters expected behaviors in forms where user interaction is required. There are legitimate scenarios where fields with const values should not be readonly, such as (see playground):
- confirmation fields where users must manually enter a specific text,
- agree to terms by interacting with a checkbox.
Attempting to override the prefilled value with default
does not work as expected, further complicating form configuration. The implementation should not automatically control whether a field is readonly. Flexibility should be provided to developers to define this behavior based on the specific use case.
Expected Behavior
Developers should have the option to configure whether a const field is prefilled and readonly or requires user input.
Steps To Reproduce
- Open the playground.
Environment
No response
Anything else?
No response