3

I have created a webform custom submission handler.

public function submitForm(array &$form, FormStateInterface $form_state,  WebformSubmissionInterface $webform_submission) {
  $webform_submission->getDate();
}

I am getting all the submitted values except the submission id. How do I get that value?

1
1

I have been able to get the submission ID in a custom submission handler using the following code.

$webform_submission->setSticky(!$webform_submission->isSticky())->save();
$sid = $webform_submission->id();
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy