You are here

function taxonomy_form in Drupal 5

Same name and namespace in other branches
  1. 4 modules/taxonomy.module \taxonomy_form()
  2. 6 modules/taxonomy/taxonomy.module \taxonomy_form()

Generate a form element for selecting terms from a vocabulary.

1 call to taxonomy_form()
taxonomy_form_alter in modules/taxonomy/taxonomy.module
Implementation of hook_form_alter(). Generate a form for selecting terms to associate with a node.

File

modules/taxonomy/taxonomy.module, line 620
Enables the organization of content into categories.

Code

function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
  $vocabulary = taxonomy_get_vocabulary($vid);
  $help = $help ? $help : filter_xss_admin($vocabulary->help);
  if (!$vocabulary->multiple) {
    $blank = $vocabulary->required ? t('- Please choose -') : t('- None selected -');
  }
  else {
    $blank = $vocabulary->required ? 0 : t('- None -');
  }
  return _taxonomy_term_select(check_plain($vocabulary->name), $name, $value, $vid, $help, intval($vocabulary->multiple), $blank);
}