Field Widget API
Same name in other branches
- 9 core/modules/field/field.api.php \field_widget
- 8.9.x core/modules/field/field.api.php \field_widget
- 10 core/modules/field/field.api.php \field_widget
- 11.x core/modules/field/field.api.php \field_widget
Define Field API widget types.
Field API widgets specify how fields are displayed in edit forms. Fields of a given field type may be edited using more than one widget. In this case, the Field UI module allows the site builder to choose which widget to use. Widget types are defined by implementing hook_field_widget_info().
Widgets are Form API elements with additional processing capabilities. Widget hooks are typically called by the Field Attach API during the creation of the field form structure with field_attach_form().
See also
Parent topics
File
-
modules/
field/ field.api.php, line 704
Functions
Title Sort descending | File name | Summary |
---|---|---|
hook_field_widget_error | modules/ |
Flag a field-level validation error. |
hook_field_widget_form | modules/ |
Return the form for a single field widget. |
hook_field_widget_form_alter | modules/ |
Alter forms for field widgets provided by other modules. |
hook_field_widget_info | modules/ |
Expose Field API widget types. |
hook_field_widget_info_alter | modules/ |
Perform alterations on Field API widget types. |
hook_field_widget_properties_alter | modules/ |
Alters the widget properties of a field instance before it gets displayed. |
hook_field_widget_properties_ENTITY_TYPE_alter | modules/ |
Alters the widget properties of a field instance on a given entity type before it gets displayed. |
hook_field_widget_WIDGET_TYPE_form_alter | modules/ |
Alter widget forms for a specific widget provided by another module. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.