function AutoTextfields::textfieldsCallback
Same name in other branches
- 3.x modules/ajax_example/src/Form/Autotextfields.php \Drupal\ajax_example\Form\Autotextfields::textfieldsCallback()
- 8.x-1.x ajax_example/src/Form/Autotextfields.php \Drupal\ajax_example\Form\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\FormCode
public function textfieldsCallback($form, FormStateInterface $form_state) {
return $form['textfields_container'];
}