You are here

function field_test_field_widget_properties_user_alter in Drupal 7

Implements hook_field_widget_properties_ENTITY_TYPE_alter().

File

modules/field/tests/field_test.module, line 242

Code

function field_test_field_widget_properties_user_alter(&$widget, $context) {

  // Always use buttons for the alter_test_options field on user forms.
  if ($context['field']['field_name'] == 'alter_test_options') {
    $widget['type'] = 'options_buttons';
  }
}