You are here

function rh_field_collection_form_field_ui_field_edit_form_alter in Rabbit Hole 7.2

Implements hook_form_FORM_ID_alter().

This will add Rabbit Hole options to the edit field form. These settings will be used as default for every field collection item.

File

modules/rh_field_collection/rh_field_collection.module, line 39
Main module file for Rabbit Hole field collections module.

Code

function rh_field_collection_form_field_ui_field_edit_form_alter(&$form, &$form_state, $form_id) {
  if (isset($form['#field']) && isset($form['#field']['type']) && $form['#field']['type'] == 'field_collection') {
    rabbit_hole_form($form, 'field_collection_item', $form['#field']['field_name'], 'rh_field_collection');
  }
}