You are here

function term_reference_plugin_style::options_form in Taxonomy Term Reference Filter by Views 7.2

Provide a form to edit options for this plugin.

Overrides views_plugin_style::options_form

File

views/term_reference_plugin_style.inc, line 17
Handler for entityreference_plugin_style.

Class

term_reference_plugin_style
@file Handler for entityreference_plugin_style.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $options = array();
  if (isset($form['grouping'])) {
    $options = $form['grouping'][0]['field']['#options'];
    unset($options['']);
    $form['search_fields'] = array(
      '#type' => 'checkboxes',
      '#title' => t('Search fields'),
      '#options' => $options,
      '#required' => TRUE,
      '#default_value' => $this->options['search_fields'],
      '#description' => t('Select the field(s) that will be searched when using the autocomplete widget.'),
      '#weight' => -3,
    );
  }
}