public function AjaxAddRemoveElements::addmoreCallback in Examples for Developers 3.x
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'];
}