Problem/Motivation

Require on Publish (ROP) should to participate in conditional_fields so site builders can gate a field's "required on publish" status using #states. Today, ROP doesn't register a state label with Conditional Fields.

Steps to reproduce

  1. Enable Require on Publish and Conditional Fields.
  2. Attempt to add a #states condition for require_on_publish in UI or code.
  3. No “Required on Publish” state appears in Conditional Fields' supported states.

Proposed resolution

Register the “Required on Publish” state via require_on_publish_conditionalFieldsStates_alter() .

Remaining tasks

  • Add the alter hook

User interface changes

Conditional Fields UI shows an additional state: Required on Publish.

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

jcandan’s picture

Assigned: jcandan » Unassigned
Issue summary: View changes
Status: Active » Reviewed & tested by the community
Related issues: -#3554298: Respect Name field “show required markers” and minimum components for ROP visuals
jcandan’s picture

Status: Reviewed & tested by the community » Fixed

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.

  • jcandan committed 21f0718c on 2.1.x
    feat: #3554300 Add Conditional Fields integration for “Required on...

Status: Fixed » Closed (fixed)

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

demonde’s picture

In my use case the conditional field reaction can be set up but did not work properly.

Can you tell under which conditions the implementation of this patch was tested?