function ajax_forms_test_validation_number_form_callback
Same name in other branches
- 9 core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module \ajax_forms_test_validation_number_form_callback()
- 8.9.x core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module \ajax_forms_test_validation_number_form_callback()
- 10 core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module \ajax_forms_test_validation_number_form_callback()
Ajax form callback: Selects the 'driver_number' element of the validation form.
1 string reference to 'ajax_forms_test_validation_number_form_callback'
- AjaxFormsTestValidationForm::buildForm in core/
modules/ system/ tests/ modules/ ajax_forms_test/ src/ Form/ AjaxFormsTestValidationForm.php - Form constructor.
File
-
core/
modules/ system/ tests/ modules/ ajax_forms_test/ ajax_forms_test.module, line 232
Code
function ajax_forms_test_validation_number_form_callback($form, FormStateInterface $form_state) {
\Drupal::messenger()->addStatus("ajax_forms_test_validation_number_form_callback invoked");
\Drupal::messenger()->addStatus(t("Callback: driver_number=%driver_number, spare_required_field=%spare_required_field", [
'%driver_number' => $form_state->getValue('driver_number'),
'%spare_required_field' => $form_state->getValue('spare_required_field'),
]));
return [
'#markup' => '<div id="message_area_number">ajax_forms_test_validation_number_form_callback at ' . date('c') . '</div>',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.