1 views_handler_filter_equality.inc views_handler_filter_equality::value_form(&$form, &$form_state)

Provide a simple textfield for equality

Overrides views_handler_filter::value_form

File

core/modules/views/handlers/views_handler_filter_equality.inc, line 30
Definition of views_handler_filter_equality.

Class

views_handler_filter_equality
Simple filter to handle equal to / not equal to filters

Code

function value_form(&$form, &$form_state) {
  $form['value'] = array(
    '#type' => 'textfield',
    '#title' => t('Value'),
    '#size' => 30,
    '#default_value' => $this->value,
  );

  if (!empty($form_state['exposed'])) {
    $identifier = $this->options['expose']['identifier'];
    if (!isset($form_state['input'][$identifier])) {
      $form_state['input'][$identifier] = $this->value;
    }
  }
}