Problem/Motivation
The "Show required marker" option is shown even when the Name field is not required. This is confusing because an optional field should not display a required marker.
Steps to reproduce
- Create a Name field.
- Get to the field settings form.
- Uncheck the box to make this field not required.
- Observe that the "Show required marker" checkbox is still available.
Proposed resolution
This issue stems from #3559064: Fix minimum components required markers shown when the base field is optional. If the markers are only to be shown when the Name field itself is required, we should only display the "Show required marker" checkbox when the Name field itself is configured as required.
We can use #states to conditionally show or hide the field settings checkbox based on the field required setting.
Remaining tasks
- Update field settings form to apply conditional visibility.
- Add or update test coverage.
User interface changes
Conditionally hides/shows the "Show required marker" checkbox field settings when the Required box is unchecked/checked.
API changes
- None.
Data model changes
- None.
Issue fork name-3559436
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jcandan commentedComment #3
aryan singh commentedWorking...
Comment #5
aryan singh commentedI have raised a MR and I have checked it locally, it is working fine.
Comment #8
bluegeek9 commented