function taxonomy_image_form_field_ui_field_edit_form_alter in Taxonomy Image 7
Implements hook_form_FORM_ID_alter() for field_ui_field_edit_form().
Cardinality of taxonomy_image is always 1. Prevent the user from changing that by disabling the form element.
File
- ./
taxonomy_image.module, line 299 - Implements a field formatter that can display image on referenced taxonomy terms.
Code
function taxonomy_image_form_field_ui_field_edit_form_alter(&$form, &$form_state, $form_id) {
if ($form['#field']['field_name'] == 'taxonomy_image') {
$form['field']['cardinality']['#disabled'] = TRUE;
}
}