public function Simplest::submitForm in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/ajax_example/src/Form/Simplest.php \Drupal\ajax_example\Form\Simplest::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- ajax_example/
src/ Form/ Simplest.php, line 68
Class
- Simplest
- A relatively simple AJAX demonstration form.
Namespace
Drupal\ajax_example\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// No-op. Our form doesn't need a submit handler, because the form is never
// submitted. We add the method here so we fulfill FormInterface.
}