public function WebformUiElementTypeFormBase::submitForm in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_ui/src/Form/WebformUiElementTypeFormBase.php \Drupal\webform_ui\Form\WebformUiElementTypeFormBase::submitForm()
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/
webform_ui/ src/ Form/ WebformUiElementTypeFormBase.php, line 165
Class
- WebformUiElementTypeFormBase
- Provides a abstract element type webform for a webform element.
Namespace
Drupal\webform_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$preview = $this->userData
->get('webform_ui', $this->currentUser
->id(), 'element_type_preview') ?: FALSE;
$this->userData
->set('webform_ui', $this->currentUser
->id(), 'element_type_preview', !$preview);
$form_state
->clearErrors();
$form_state
->setRebuild();
}