You are here

function colectomy_form_field_ui_display_overview_form_alter in Colectomy 7

Implements hook_form_FORMID_alter().

Adds two new options to the field label options.

See also

field_ui_display_overview_form()

File

./colectomy.module, line 15
Allows the option to hide the colon on field labels in field forms.

Code

function colectomy_form_field_ui_display_overview_form_alter(&$form, &$form_state) {
  foreach (element_children($form['fields']) as $key) {

    // Not all fields have labels, so check first.
    if (isset($form['fields'][$key]['label'])) {

      // Add the new options.
      $form['fields'][$key]['label']['#options'] += array(
        'abovec' => 'Above no colon',
        'inlinec' => 'Inline no colon',
      );
    }
  }
}