FormState::$input

Same name in other branches
  1. 9 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::input
  2. 8.9.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::input
  3. 11.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::input

The array of values as they were submitted by the user.

These are raw and non validated, so should not be used without a thorough understanding of security implications. In almost all cases, code should use the data in the 'values' array exclusively. The most common use of this key is for multi-step forms that need to clear some of the user input when setting 'rebuild'. The values correspond to \Drupal::request()->request or \Drupal::request()->query, depending on the 'method' chosen.

This property is uncacheable.

The submitted user input array, or NULL if no input was submitted yet.

Type: array|null

File

core/lib/Drupal/Core/Form/FormState.php, line 278

Class

FormState
Stores information about the state of a form.

Namespace

Drupal\Core\Form

Code

protected $input;

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