Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module makes fields required only when an entity is in a specific workflow state. It is designed to improve the accuracy of complex, multi-person workflows.

The Workflow Required by State module allows fields to be required only when the associated entity (or parent entity) is in a specific workflow state.

N.B. This module extends the contrib Workflow module, and not core's content-moderation workflows.

USE CASES

The primary use case for this module is:

  • To make complex multi-participant workflows less error-prone.

REQUIREMENTS

This module requires the Workflow module.

INSTALLATION

Install as you would normally install a contributed Drupal module.
See: https://www.drupal.org/node/895232 for further information.

CONFIGURATION

You'll need the following before being able to configure this module's settings.

  • Add one or more workflows and populate them with some workflow states.
  • Add a content type and add a workflow field to it.
  • Add a field that you want to make dependent on the workflow state.

To configure this module's settings:

  • Open the settings of field that you want to make dependent on the workflow state.
  • Ensure that the "Required" checkbox is not checked.
  • Check the "Override the required flag per workflow state" checkbox.
  • Select the desired workflow from the "Select the workflow on which this field should depend" list.
  • Check the desired states from the "Select the workflow states that will make this field required" checkboxes.

The configuration checkbox labeled "Set field as required immediately upon selecting workflow state using Javascript." allows you to alter the behaviour of this module for a given field:

  • If you prefer to have the "required" state of the configured field take effect only after the form is submitted and the entity is in the desired state, leave this checkbox unchecked.
  • If you want the configured field to be flagged as required dynamically as soon as the Workflow state field value has changed, check this box, and Workflow Required by State will add some Javascript to the page to achieve this.

SIMILAR MODULES

  • Conditional Fields module should be able to achieve a similar behaviour if your entity form is simple and you want the "required" state of the desired field to take effect immediately.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0-beta4 Pre-release 10 Feb 7, 2025
1.0.0-beta3 Pre-release 10 Feb 6, 2025