taxonomy_form
Definition
taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy')
modules/taxonomy/taxonomy.module, line 416
Description
Generate a form element for selecting terms from a vocabulary.
Code
<?php
function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') {
$vocabulary = taxonomy_vocabulary_load($vid);
$help = ($help) ? $help : $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);
}
?> 