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

Finally, i got the answer in order to get submission id in custom submission handler use

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

Your Answer

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