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

  1. Create a Name field.
  2. Get to the field settings form.
  3. Uncheck the box to make this field not required.
  4. 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

Command icon 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

jcandan created an issue. See original summary.

jcandan’s picture

Issue summary: View changes
aryan singh’s picture

Working...

aryan singh’s picture

Status: Active » Needs review

I have raised a MR and I have checked it locally, it is working fine.

bluegeek9 made their first commit to this issue’s fork.

bluegeek9 changed the visibility of the branch 8.x-1.x to hidden.

bluegeek9’s picture

Status: Needs review » Closed (duplicate)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.