function hook_webform_element_default_properties_alter in Webform 8.5
Same name and namespace in other branches
- 6.x webform.api.php \hook_webform_element_default_properties_alter()
Alter a webform element's default properties.
Parameters
array &$properties: An associative array containing an element's default properties.
array $definition: The webform element's definition.
See also
webform_example_element_properties.module
2 functions implement hook_webform_element_default_properties_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- webform_example_element_properties_webform_element_default_properties_alter in modules/
webform_example_element_properties/ webform_example_element_properties.module - Implements hook_webform_element_default_properties_alter().
- webform_icheck_webform_element_default_properties_alter in modules/
webform_icheck/ webform_icheck.module - Implements hook_webform_element_default_properties_alter().
1 invocation of hook_webform_element_default_properties_alter()
- WebformElementBase::getDefaultProperties in src/
Plugin/ WebformElementBase.php - Get default properties.
File
- ./
webform.api.php, line 65 - Hooks related to Webform module.
Code
function hook_webform_element_default_properties_alter(array &$properties, array &$definition) {
// Add custom data property to all webform elements.
// Setting the custom property to an empty string makes the corresponding
// element defined via hook_webform_element_configuration_form_alter()
// automatically visible.
$properties['custom_data'] = '';
}