function AutoTextfields::textfieldsCallback

Callback for ajax_example_auto_text_fields.

Selects the piece of the form we want to use as replacement markup and returns it as a form (renderable array).

File

modules/ajax_example/src/Form/AutoTextfields.php, line 120

Class

AutoTextfields
Adds more text fields basing on AJAX-enabled checkbox clicks.

Namespace

Drupal\ajax_example\Form

Code

public function textfieldsCallback($form, FormStateInterface $form_state) {
  return $form['textfields_container'];
}