Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

INTRODUCTION
------------

When you have a requirement that adding/editing any node and setting its workflow state should be two distinct actions occurring on different site paths, Moderation State Form Knockout allows the moderation state widget to appear on node add/edit forms but disables interaction so that workflow changes can occur elsewhere (e.g. using moderation controls on "Latest version" display).

## Rationale

Our initial plan to simply remove the moderation field widget from add/edit form for each node type was discovered to be inadequate as it allows node edits for published nodes to be saved as published.

This module uses form alter to:
1. remove non-draft options from the moderation state widget.
2. style the widget as disabled, so users are not tempted to try and alter the state.

## Other options

Setting field `#access` false prevents the widget from rendering, so behaviour is like deleting widget via drupal form admin.
e.g. `$form['moderation_state']['#access'] = FALSE;`

Setting widget state select to disabled (a) removes it from render, so next state is not visible, but also means widget value won't be submitted, e.g.
`$form['moderation_state']['widget'][0]['state']['#type']['#disabled'] = 'disabled';`

Setting `disabled="disabled"` via javascript removes field value from submitted form values causing Drupal to complain about an invalid moderation state transition.

REQUIREMENTS
------------

This module requires no modules outside of Drupal core. It depends upon Content Moderation, and it assumes workflow state `draft` exists.

INSTALLATION
------------

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

CONFIGURATION
-------------

There is no configuration. When
enabled, the module will disable interaction with the moderation state widget on node add/edit forms for all content types.

Activity

Total releases
1
First release
Nov 2025
Latest release
5 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.0 Stable Nov 18, 2025