function hook_field_widget_form_alter in Workflow 8
Same name and namespace in other branches
- 7.2 workflow.api.php \hook_field_widget_form_alter()
Alter forms for field widgets provided by other modules.
Parameters
$element: The field widget form element as constructed by hook_field_widget_form().
$form_state: An associative array containing the current state of the form.
$context: An associative array containing the following key-value pairs, matching the arguments received by hook_field_widget_form():
- form: The form structure to which widgets are being attached. This may be a full form structure, or a sub-element of a larger form.
- field: The field structure.
- instance: The field instance structure.
- langcode: The language associated with $items.
- items: Array of default values for this field.
- delta: The order of this item in the array of subelements (0, 1, 2, etc).
See also
hook_field_widget_form()
hook_field_widget_WIDGET_TYPE_form_alter()
1 call to hook_field_widget_form_alter()
- workflow_devel_field_widget_form_alter in modules/
workflow_devel/ workflow_devel.module - Alter forms for field widgets provided by other modules.
1 function implements hook_field_widget_form_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- workflow_devel_field_widget_form_alter in modules/
workflow_devel/ workflow_devel.module - Alter forms for field widgets provided by other modules.
File
- ./
workflow.api.php, line 276 - Hooks provided by the workflow module.
Code
function hook_field_widget_form_alter(&$element, FormStateInterface $form_state, $context) {
// A hook for changing any widget. Better use below (more specific) hooks.
// workflow_debug(__FILE__, __FUNCTION__, __LINE__, $context['widget']->getPluginId(), '');
}