function hook_webform_component_info_alter in Webform 7.4
Same name and namespace in other branches
- 6.3 webform.api.php \hook_webform_component_info_alter()
- 7.3 webform.api.php \hook_webform_component_info_alter()
Alter the list of available Webform components.
Parameters
$components: A list of existing components as defined by hook_webform_component_info().
See also
Related topics
1 invocation of hook_webform_component_info_alter()
- webform_components in ./
webform.module - Get a list of all available component definitions.
File
- ./
webform.api.php, line 578 - Sample hooks demonstrating usage in Webform.
Code
function hook_webform_component_info_alter(&$components) {
// Completely remove a component.
unset($components['grid']);
// Change the name of a component.
$components['textarea']['label'] = t('Text box');
}