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.

▾ 1 function calls taxonomy_form()

taxonomy_form_alter in modules/taxonomy.module
Generate a form for selecting terms to associate with a node.

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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.