1 views_plugin_argument_validate_taxonomy_term.inc views_plugin_argument_validate_taxonomy_term::options_form(&$form, &$form_state)

Provide the default form for setting options.

Overrides views_plugin_argument_validate::options_form


core/modules/taxonomy/views/views_plugin_argument_validate_taxonomy_term.inc, line 34
Contains the 'taxonomy term' argument validator plugin.


Validate whether an argument is an acceptable node.


function options_form(&$form, &$form_state) {
  $vocabularies = taxonomy_vocabulary_load_multiple(FALSE);
  $options = array();
  foreach ($vocabularies as $voc) {
    $options[$voc->machine_name] = check_plain($voc->name);

  $form['vocabularies'] = array(
    '#type' => 'checkboxes',
    '#prefix' => '<div id="edit-options-validate-argument-vocabulary-wrapper">',
    '#suffix' => '</div>',
    '#title' => t('Vocabularies'),
    '#options' => $options,
    '#default_value' => $this->options['vocabularies'],
    '#description' => t('If you wish to validate for specific vocabularies, check them; if none are checked, all terms will pass.'),

  $form['type'] = array(
    '#type' => 'select',
    '#title' => t('Filter value type'),
    '#options' => array(
      'tid' => t('Term ID'),
      'tids' => t('Term IDs separated by , or +'),
      'name' => t('Term name'),
      'convert' => t('Term name converted to Term ID'),
    '#default_value' => $this->options['type'],
    '#description' => t('Select the form of this filter value; if using term name, it is generally more efficient to convert it to a term ID and use Taxonomy: Term ID rather than Taxonomy: Term Name" as the filter.'),

  $form['transform'] = array(
    '#type' => 'checkbox',
    '#title' => t('Transform dashes in URL to spaces in term name filter values'),
    '#default_value' => $this->options['transform'],