You are here

public function InputRequired::submitOptionsForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/exposed_form/InputRequired.php \Drupal\views\Plugin\views\exposed_form\InputRequired::submitOptionsForm()

Handle any special handling on the validate form.

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);
}