Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

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.

Activity

Total releases
1
First release
Nov 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0 Stable Nov 18, 2025