function AjaxAddMore::addmoreCallback
Same name in other branches
- 8.x-1.x form_api_example/src/Form/AjaxAddMore.php \Drupal\form_api_example\Form\AjaxAddMore::addmoreCallback()
- 4.0.x modules/form_api_example/src/Form/AjaxAddMore.php \Drupal\form_api_example\Form\AjaxAddMore::addMoreCallback()
Callback for both ajax-enabled buttons.
Selects and returns the fieldset with the names in it.
File
-
modules/
form_api_example/ src/ Form/ AjaxAddMore.php, line 97
Class
- AjaxAddMore
- Implements the ajax demo form controller.
Namespace
Drupal\form_api_example\FormCode
public function addmoreCallback(array &$form, FormStateInterface $form_state) {
return $form['names_fieldset'];
}