public static function JsWebAssertTestForm::addField in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addField()
- 9 core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php \Drupal\js_webassert_test\Form\JsWebAssertTestForm::addField()
Ajax callback for the "Add field" button.
File
- core/
modules/ system/ tests/ modules/ js_webassert_test/ src/ Form/ JsWebAssertTestForm.php, line 162
Class
- JsWebAssertTestForm
- Test form for JSWebAssert WebDriverTestBase.
Namespace
Drupal\js_webassert_test\FormCode
public static function addField(array $form, FormStateInterface $form_state) {
$form['added_field'] = [
'#type' => 'textfield',
'#title' => 'Added textfield',
'#name' => 'added_field',
];
return $form;
}