Remove the taxonomy description field Drupal 7
The description field on taxonomy term pages can't be deleted
The description field from taxonomy terms is a property of the taxonomy term entity and can't be deleted. It isn't a field coming from the field module but its values are stored inside the taxonomy_term_data table.
Hook_form_alter can be used to manipulate access to the field.
Use hook_form_id_alter(&form, &form_state, $form_id) to access the taxonomy term form.
This hook is placed inside a custom module.
Disable the taxonomy description for everybody
/**
* Implements hook_form_FORM_ID_alter().
*/
function MYMODULE_form_taxonomy_form_term_alter(&$form, &$form_state) {
$form['description']['#access'] = FALSE;
}
Disable the taxonomy description for everybody except the global administrator
/**
* Implements hook_form_FORM_ID_alter().
*/
function MYMODULE_form_taxonomy_form_term_alter(&$form, &$form_state) {
global $user;
if ($user->uid != 1) {
$form['description']['#access'] = FALSE;
}
}
Disable the taxonomy description for a certain role
/**
* Implements hook_form_FORM_ID_alter().
*/
function MYMODULE_form_taxonomy_form_term_alter(&$form, &$form_state) {
global $user;
if (in_array('administrator', $user->roles)) {
$form['description']['#access'] = FALSE;
}
}
Leave the taxonomy description enabled for administrators only
/**
* Implements hook_form_FORM_ID_alter().
*/
function MYMODULE_form_taxonomy_form_term_alter(&$form, &$form_state) {
global $user;
if (!in_array('administrator', $user->roles)) {
$form['description']['#access'] = FALSE;
}
}