Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Workflow Required by State

Security covered Under active development

Part of the Workflow ecosystem · 8 projects

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.

Ask your assistant about Workflow Required by State

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
4
Tracked since
Mar 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-beta4 Pre-release 10 Feb 7, 2025
1.0.0-beta3 Pre-release 10 Feb 6, 2025
1.0.0-beta2 Pre-release 10 Mar 7, 2024
1.0.0-beta1 Pre-release 10 Mar 7, 2024