You are here

function views_taxonomy_form in Views (for Drupal 7) 5

1 call to views_taxonomy_form()
taxonomy_views_tables in modules/views_taxonomy.inc
This include file implements views functionality on behalf of taxonomy.module

File

modules/views_taxonomy.inc, line 230

Code

function views_taxonomy_form(&$vocabulary) {
  if ($vocabulary->tags) {
    $form = array(
      '#type' => 'textfield',
      '#autocomplete_path' => 'taxonomy/autocomplete/' . $vocabulary->vid,
      '#process' => array(
        'views_taxonomy_process_form' => array(),
      ),
      '#maxlength' => 255,
    );
  }
  else {
    $form = taxonomy_form($vocabulary->vid, 0, $vocabulary->help);
    unset($form['#title']);
    unset($form['#description']);
    if (!$vocabulary->multiple || !$vocabulary->required) {
      unset($form['#options']['']);
    }
    unset($form['#default_value']);
    $form['#multiple'] = TRUE;
  }
  return $form;
}