public function GeolocationSettings::addLibrariesSubmit in Geolocation Field 8
Ajax submit to add new field.
File
- src/
Form/ GeolocationSettings.php, line 140
Class
- GeolocationSettings
- Implements the GeolocationGoogleMapAPIkey form controller.
Namespace
Drupal\geolocation\FormCode
public function addLibrariesSubmit(array &$form, FormStateInterface &$form_state) {
$max = $form_state
->get('fields_count') + 1;
$form_state
->set('fields_count', $max);
$form_state
->setRebuild(TRUE);
}