function FormTestRebuildPreserveValuesForm::addMoreSubmitForm
File
-
core/
modules/ system/ tests/ modules/ form_test/ src/ Form/ FormTestRebuildPreserveValuesForm.php, line 89
Class
- FormTestRebuildPreserveValuesForm
- Form builder for testing preservation of values during a rebuild.
Namespace
Drupal\form_test\FormCode
public function addMoreSubmitForm(array &$form, FormStateInterface $form_state) {
// Rebuild, to test preservation of input values.
$form_state->set('add_more', TRUE);
$form_state->setRebuild();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.