$this->t('Is equal to'), '!=' => $this->t('Is not equal to'), ]; } /** * Provide a simple textfield for equality */ protected function valueForm(&$form, FormStateInterface $form_state) { $form['value'] = [ '#type' => 'textfield', '#title' => $this->t('Value'), '#size' => 30, '#default_value' => $this->value, ]; if ($exposed = $form_state->get('exposed')) { $identifier = $this->options['expose']['identifier']; $user_input = $form_state->getUserInput(); if (!isset($user_input[$identifier])) { $user_input[$identifier] = $this->value; $form_state->setUserInput($user_input); } } } }