taxonomy_form
- Versions
- 4.6 – 6
taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy')
Generate a form element for selecting terms from a vocabulary.
Code
modules/taxonomy.module, line 536
<?php
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);
}
?>Login or register to post comments 