2 * Implements hook_field_widget_WIDGET_TYPE_form_alter().
4 function {{ machine_name }}_field_widget_WIDGET_TYPE_form_alter(&$element, &$form_state, $context) {
5 // Code here will only act on widgets of type WIDGET_TYPE. For example,
6 // hook_field_widget_mymodule_autocomplete_form_alter() will only act on
7 // widgets of type 'mymodule_autocomplete'.
8 $element['#autocomplete_path'] = 'mymodule/autocomplete_path';