public function buildExposeForm(&$form, FormStateInterface $form_state) { parent::buildExposeForm($form, $form_state); if ($this->options['type'] != 'select') { unset($form['expose']['reduce']); } $form['error_message'] = array('#type' => 'checkbox', '#title' => $this->t('Display error message'), '#default_value' => !empty($this->options['error_message'])); }