function AjaxAddRemoveElements::addMoreCallback
Callback for both ajax-enabled buttons.
Selects and returns the fieldset with the names in it.
File
-
modules/
form_api_example/ src/ Form/ AjaxAddRemoveElements.php, line 122
Class
- AjaxAddRemoveElements
- Example ajax add remove buttons.
Namespace
Drupal\form_api_example\FormCode
public function addMoreCallback(array &$form, FormStateInterface $form_state) {
return $form['names_fieldset'];
}