field_ui_form_field_ui_field_storage_add_form_alter

field_ui_form_field_ui_field_storage_add_form_alter(array &$form)

Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'.

File

core/modules/field_ui/field_ui.module, line 244
Allows administrators to attach custom fields to fieldable types.

Code

function field_ui_form_field_ui_field_storage_add_form_alter(array &$form) {
  $optgroup = (string) t('Reference');
  // Move the "Entity reference" option to the end of the list and rename it to
  // "Other".
  unset($form['add']['new_storage_type']['#options'][$optgroup]['entity_reference']);
  $form['add']['new_storage_type']['#options'][$optgroup]['entity_reference'] = t('Other…');
}
doc_Drupal
2016-10-29 09:13:02
Comments
Leave a Comment

Please login to continue.