Add Conditional Fields integration for “Required on Publish” state

Created on 24 October 2025, 8 days ago

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

In order to work nicely with Name fields, this should rely on 🐛 Respect Name field “show required markers” and minimum components for ROP visuals Active .

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

Remaining tasks

  • Add the alter hook
  • Add tiny test coverage asserting the state exists.

User interface changes

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

Feature request
Status

Active

Version

2.1

Component

Code

Created by

🇺🇸United States jcandan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024