private function SiteSettingReplicateForm::addNewFields in Site Settings and Labels 8
Handle adding new.
1 call to SiteSettingReplicateForm::addNewFields()
- SiteSettingReplicateForm::submitForm in src/
Form/ SiteSettingReplicateForm.php - Form submission handler.
File
- src/
Form/ SiteSettingReplicateForm.php, line 243
Class
- SiteSettingReplicateForm
- Class SiteSettingReplicateForm.
Namespace
Drupal\site_settings\FormCode
private function addNewFields(array &$form, FormStateInterface $form_state) {
// Add 1 to the number of names.
$num_to_generate = $form_state
->get('num_to_generate');
$form_state
->set('num_to_generate', $num_to_generate + 1);
// Rebuild the form.
$form_state
->setRebuild();
}