Posted by a-fro on January 17, 2013 at 1:49pm
2 followers
| Project: | Webform |
| Version: | 7.x-3.18 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
We use hook_webform_node_defaults_alter() to adjust the default settings for webforms and love it. However, we also needed a way to alter the default block settings for a webform (the display_block and view mode settings).
The following patch uses the same convention you are using for the node settings for the block settings, which then allows us to create the following hook:
function custom_module_webform_block_defaults_alter(&$defaults) {
$defaults['pages_block'] = '1';
$defaults['display'] = 'full';
}| Attachment | Size |
|---|---|
| webform_block_defaults.patch | 921 bytes |
Comments
#1
Revised patch also updates webform_block_view() to rely on the webform_block_defaults() method.