Problem/Motivation

Currently, the red asterisk indicating that a field is required always shows, also when the field is optional through a required strategy.

When a required strategy uses global information from e.g. the currently logged in user, it could not show the asterisk when displaying the entity form. When the requiredness is dependent on a field value of the same entity, e.g. in the case of Required by Content Moderation state, we wouldn't be able to do this unless we reload the whole form using AJAX.

Proposed resolution

Hide the required asterisk when the field is not required when loading the entity form.

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

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Status: Active » Needs review

  • dieterholvoet committed 67578144 on 3.0.x
    Issue #3540426 by dieterholvoet: Only show red asterisk when the field...
dieterholvoet’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.