public function YamlFormUiElementDeleteForm::submitForm in YAML Form 8
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- modules/
yamlform_ui/ src/ Form/ YamlFormUiElementDeleteForm.php, line 206
Class
- YamlFormUiElementDeleteForm
- Form for deleting a form element.
Namespace
Drupal\yamlform_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->yamlform
->save();
drupal_set_message($this
->t('The form element %title has been deleted.', [
'%title' => $this
->getElementTitle(),
]));
$form_state
->setRedirectUrl($this->yamlform
->toUrl('edit-form'));
}