value) && count($this->value) < 2) { $this->value = $this->value ? reset($this->value) : NULL; } $fields = $this->getFulltextFields(); $form['value'] = array( '#type' => 'select', '#title' => t('Searched fields'), '#description' => t('Select the fields that will be searched. If no fields are selected, all available fulltext fields will be searched.'), '#options' => $fields, '#size' => min(4, count($fields)), '#multiple' => TRUE, '#default_value' => $this->options['fields'], ); // Hide the value box if the operator is 'empty' or 'not empty'. // Radios share the same selector so we have to add some dummy selector. if (empty($form_state['exposed'])) { $form['value']['#states']['visible'] = array( ':input[name="options[operator]"],dummy-empty' => array('!value' => 'empty'), ':input[name="options[operator]"],dummy-not-empty' => array('!value' => 'not empty'), ); } elseif (!empty($this->options['expose']['use_operator'])) { $name = $this->options['expose']['operator_id']; $form['value']['#states']['visible'] = array( ':input[name="' . $name . '"],dummy-empty' => array('!value' => 'empty'), ':input[name="' . $name . '"],dummy-not-empty' => array('!value' => 'not empty'), ); } } /** * Extend the options form a bit. */ public function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); $form['operator']['#prefix'] = '