W3cubDocs

/Drupal 8

public function FormBuilderInterface::processForm

public FormBuilderInterface::processForm($form_id, &$form, FormStateInterface &$form_state)

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

File

core/lib/Drupal/Core/Form/FormBuilderInterface.php, line 218

Class

FormBuilderInterface
Provides an interface for form building and processing.

Namespace

Drupal\Core\Form

Code

public function processForm($form_id, &$form, FormStateInterface &$form_state);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Form!FormBuilderInterface.php/function/FormBuilderInterface::processForm/8.1.x