You are here

function editor_note_form_field_ui_field_edit_form_alter in Editor Notes 7

Implements hook_form_FORM_ID_alter() for field_ui_field_edit_form().

Alters cardinality field of field settings form.

File

./editor_note.module, line 599
Main functionality for Editor Notes module.

Code

function editor_note_form_field_ui_field_edit_form_alter(&$form) {
  if ($form['#field']['type'] == 'editor_note') {

    // Makes cardinality field hidden for the field type
    // because the editor is allowed to submit unrestricted amount of notes.
    $form['field']['cardinality'] = array(
      '#type' => 'value',
      '#value' => 1,
    );
  }
}