You are here

public function Autosubmit::buildOptionsForm in Views Autosubmit 8

.

Overrides ExposedFormPluginBase::buildOptionsForm

File

src/Plugin/views/exposed_form/Autosubmit.php, line 35

Class

Autosubmit
Extends the exposed form to provide an autosubmit functionality.

Namespace

Drupal\views_autosubmit\Plugin\views\exposed_form

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['autosubmit_hide'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Hide submit button'),
    '#description' => $this
      ->t('Hide submit button if javascript is enabled.'),
    '#default_value' => $this->options['autosubmit_hide'],
  ];
}