How to make ajax work inside hook_field_widget_form()

/** * Implements hook_field_widget_form(). */ function test_field_widget_form($form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) { $form_field[‘autocomplete’] = array( ‘#type’ => ‘textfield’, ‘#title’ => ‘Tags’, ‘#autocomplete_path’ => ‘taxonomy/autocomplete’ . ‘/’ . $field[‘field_name’], ‘#size’ => $instance[‘widget’][‘settings’][‘size’], ‘#maxlength’ => 1024, ‘#element_validate’ => array(‘taxonomy_autocomplete_validate’), ‘#prefix’ => ‘ ‘, ‘#suffix’[…]