I am attempting to write a simple webform handler to add to the end of a multi-step webform, ultimately to generate a barcode with the submitted data. I've had success with other handlers on single step forms but it looks like the handler causes the wizard form to freeze and not progress to the next step.
My suspicion is that I'm missing something in my plugin code but I can't seem to find an answer to the problem in similar issues.
So far there's no functionality attempted in the handler because the form freezes on the first step.
Ultimately I only need this handler to fire upon final submission of my form.
I'm trying to test for the forms state with $webform_submission->getState() but I can't seem to get it right
public function postSave(WebformSubmissionInterface $webform_submission, $update = TRUE) {
$state = $webform_submission->getWebform()->getSetting('results_disabled') ? WebformSubmissionInterface::STATE_COMPLETED : $webform_submission->getState();
if ($this->configuration['states'] && in_array($state, $this->configuration['states'])) {
//do something
}
}
/admin/reports/dblog
?