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).

Moderation State Form Knockout

45 sites Security covered Drupal 10–11
View on drupal.org

This module prevents users from changing a node's moderation state directly on the add/edit form. It applies styling to appear disabled, ensuring that workflow state changes must be handled through separate moderation controls. This prevents accidental saving of published nodes as published.

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.

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
1
Tracked since
Nov 2025
Latest release
9 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Nov 18, 2025