function hook_webform_component_display_alter in Webform 7.4
Allow modules to modify a "display only" webform component.
Parameters
array $element: The display element as returned by _webform_display_component().
array $component: A Webform component array.
See also
Related topics
1 invocation of hook_webform_component_display_alter()
- _webform_client_form_add_component in ./
webform.module - Add a component to a renderable array. Called recursively for fieldsets.
File
- ./
webform.api.php, line 1054 - Sample hooks demonstrating usage in Webform.
Code
function hook_webform_component_display_alter(array &$element, array &$component) {
if ($component['cid'] == 10) {
$element['#title'] = 'My custom title';
$element['#default_value'] = 42;
}
}