Skip to main content
added 693 characters in body
Source Link
cconolly
  • 481
  • 3
  • 7

The description field is a main field. The equivalent to the body field in a node. If you dont need it you have 2 options.

  1. You can just ignore it
  2. You can use hook_form_alter to hide it for this (or all vocabularies)

There is no setting 'hide description field). If you want to hide the field from the form altogether let me know and I can explain hook_form_alter if you need me to. Otherwise when I don't need a description field in my taxonomy terms, i just leave it blank.

Edit to include the hook form alter

Information on hook_form_alter can be found here: http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_form_alter/7

This can go either in your theme's template.php or a custom module, I'm going to assume your theme, and rather than the standard hook_form_alter we'll use hook_form_FORM_ID_alter

/*
* Implementation of hook_form_FORM_ID_alter
* 
* Hiding taxonomy term description field
*/

function YOUR_THEME_NAME_form_taxonomy_form_term_alter(&$form, &$form_state) {
  $form['description']['#access'] = FALSE;
}

Just change theme name for module name if your using a module

The description field is a main field. The equivalent to the body field in a node. If you dont need it you have 2 options.

  1. You can just ignore it
  2. You can use hook_form_alter to hide it for this (or all vocabularies)

There is no setting 'hide description field). If you want to hide the field from the form altogether let me know and I can explain hook_form_alter if you need me to. Otherwise when I don't need a description field in my taxonomy terms, i just leave it blank.

The description field is a main field. The equivalent to the body field in a node. If you dont need it you have 2 options.

  1. You can just ignore it
  2. You can use hook_form_alter to hide it for this (or all vocabularies)

There is no setting 'hide description field). If you want to hide the field from the form altogether let me know and I can explain hook_form_alter if you need me to. Otherwise when I don't need a description field in my taxonomy terms, i just leave it blank.

Edit to include the hook form alter

Information on hook_form_alter can be found here: http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_form_alter/7

This can go either in your theme's template.php or a custom module, I'm going to assume your theme, and rather than the standard hook_form_alter we'll use hook_form_FORM_ID_alter

/*
* Implementation of hook_form_FORM_ID_alter
* 
* Hiding taxonomy term description field
*/

function YOUR_THEME_NAME_form_taxonomy_form_term_alter(&$form, &$form_state) {
  $form['description']['#access'] = FALSE;
}

Just change theme name for module name if your using a module

Source Link
cconolly
  • 481
  • 3
  • 7

The description field is a main field. The equivalent to the body field in a node. If you dont need it you have 2 options.

  1. You can just ignore it
  2. You can use hook_form_alter to hide it for this (or all vocabularies)

There is no setting 'hide description field). If you want to hide the field from the form altogether let me know and I can explain hook_form_alter if you need me to. Otherwise when I don't need a description field in my taxonomy terms, i just leave it blank.