- Issue created by @davemaxg
I have a custom webform handler that populates other webform elements then saves the webform submission all within the submitForm method. This works fine for a webform that was submitted.
However, when using the REST based webform submission for a new submission, if I try to save the submission within this method, I get a MySQL error like this:
Integrity constraint violation: 1062 Duplicate entry '1a697ccf-c618-46f4-b6b5-e755cc616ff6' for key 'webform_submission_field__uuid__value
If I remove the save operation, then my populated elements do not get persisted even when updating all of them via
$webform_submission->setData($values);
I'm starting to think that I may be doing this submission updating work in the wrong place since I would think that the webform custom handler should work for REST as well as regular webforms.
Please help.
Thank you :)
Active
4.1
Code