function FormBuilderInterface::processForm
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Form/FormBuilderInterface.php \Drupal\Core\Form\FormBuilderInterface::processForm()
- 10 core/lib/Drupal/Core/Form/FormBuilderInterface.php \Drupal\Core\Form\FormBuilderInterface::processForm()
- 11.x core/lib/Drupal/Core/Form/FormBuilderInterface.php \Drupal\Core\Form\FormBuilderInterface::processForm()
Processes a form submission.
This function is the heart of form API. The form gets built, validated and in appropriate cases, submitted and rebuilt.
Parameters
string $form_id: The unique string identifying the current form.
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. This includes the current persistent storage data for the form, and any data passed along by earlier steps when displaying a multi-step form. Additional information, like the sanitized \Drupal::request()->request data, is also accumulated here.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse|null
1 method overrides FormBuilderInterface::processForm()
- FormBuilder::processForm in core/
lib/ Drupal/ Core/ Form/ FormBuilder.php - Processes a form submission.
File
-
core/
lib/ Drupal/ Core/ Form/ FormBuilderInterface.php, line 215
Class
- FormBuilderInterface
- Provides an interface for form building and processing.
Namespace
Drupal\Core\FormCode
public function processForm($form_id, &$form, FormStateInterface &$form_state);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.