function taxonomy_form in Drupal 4
Same name and namespace in other branches
- 5 modules/taxonomy/taxonomy.module \taxonomy_form()
- 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.module - Generate a form for selecting terms to associate with a node.
File
- modules/
taxonomy.module, line 536 - 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 : $vocabulary->help;
if ($vocabulary->required) {
$blank = 0;
}
else {
$blank = '<' . t('none') . '>';
}
return _taxonomy_term_select(check_plain($vocabulary->name), $name, $value, $vid, $help, intval($vocabulary->multiple), $blank);
}