function JsWebAssertTestForm::addField

Ajax callback for the "Add field" button.

File

core/modules/system/tests/modules/jswebassert_test/src/Form/JsWebAssertTestForm.php, line 164

Class

JsWebAssertTestForm
Test form for JSWebAssert WebDriverTestBase.

Namespace

Drupal\jswebassert_test\Form

Code

public static function addField(array $form, FormStateInterface $form_state) {
  $form['added_field'] = [
    '#type' => 'textfield',
    '#title' => 'Added textfield',
    '#name' => 'added_field',
  ];
  return $form;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.