Block Form Alter
The Block Form Alter module provides functions to alter block forms consistently across implementing plugins:
hook_block_plugin_form_alter()hook_block_type_form_alter()
Block forms are rendered by implementing plugins, which may require duplicate code in some instances where a developer desires to alter a given block form. This is particularly true when altering forms rendered by Layout Builder.
Supported Modules
- Block (core)
- Block Content (core)
- Layout Builder (core)
hook_block_plugin_form_alter()
The hook_block_plugin_form_alter() function allows for block forms to be targeted by plugin id. Block forms rendered by the 'block_content' and 'inline_block' plugins must be altered with hook_block_type_form_alter(). See block_form_alter.api.php for details.
hook_block_type_form_alter()
The hook_block_type_form_alter() function modifies block forms rendered by both Block Content ('block_content' plugin) and Layout Builder ('inline_block' plugin). See block_form_alter.api.php for details.
Related Core Issue
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
Releases
| Version | Type | Core | Release date | |
|---|---|---|---|---|
| 2.1.0 | Stable | Aug 26, 2024 |