function InputRequired::submitOptionsForm

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/exposed_form/InputRequired.php \Drupal\views\Plugin\views\exposed_form\InputRequired::submitOptionsForm()
  2. 10 core/modules/views/src/Plugin/views/exposed_form/InputRequired.php \Drupal\views\Plugin\views\exposed_form\InputRequired::submitOptionsForm()
  3. 11.x core/modules/views/src/Plugin/views/exposed_form/InputRequired.php \Drupal\views\Plugin\views\exposed_form\InputRequired::submitOptionsForm()

Overrides PluginBase::submitOptionsForm

File

core/modules/views/src/Plugin/views/exposed_form/InputRequired.php, line 42

Class

InputRequired
Exposed form plugin that provides an exposed form with required input.

Namespace

Drupal\views\Plugin\views\exposed_form

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    $exposed_form_options = $form_state->getValue('exposed_form_options');
    $form_state->setValue([
        'exposed_form_options',
        'text_input_required_format',
    ], $exposed_form_options['text_input_required']['format']);
    $form_state->setValue([
        'exposed_form_options',
        'text_input_required',
    ], $exposed_form_options['text_input_required']['value']);
    parent::submitOptionsForm($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.