You are here

public function Autotextfields::textfieldsCallback in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/ajax_example/src/Form/Autotextfields.php \Drupal\ajax_example\Form\Autotextfields::textfieldsCallback()

Callback for ajax_example_autotextfields.

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

File

ajax_example/src/Form/Autotextfields.php, line 120

Class

Autotextfields
Show textfields based on AJAX-enabled checkbox clicks.

Namespace

Drupal\ajax_example\Form

Code

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