You are here

public function WebformSubmissionForm::draft in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::draft()

Webform submission handler for the 'draft' action.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

File

src/WebformSubmissionForm.php, line 1780

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

public function draft(array &$form, FormStateInterface $form_state) {
  $form_state
    ->clearErrors();
  $form_state
    ->set('in_draft', TRUE);
  $form_state
    ->set('draft_saved', TRUE);
  $this->entity
    ->validate();
}