FormState::$requestMethod

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::requestMethod
  2. 8.9.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::requestMethod
  3. 10 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::requestMethod

The HTTP method used by the request building or processing this form.

May be any valid HTTP method. Defaults to 'GET', because even though $method is 'POST' for most forms, the form's initial build is usually performed as part of a GET request.

This property is uncacheable.

Type: string

File

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

Class

FormState
Stores information about the state of a form.

Namespace

Drupal\Core\Form

Code

protected $requestMethod = 'GET';

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