Webform computed element post save alter

Created on 25 June 2024, about 1 year ago

Problem/Motivation

I'm currently developing a module for encrypting the database - extending upon https://www.drupal.org/project/webform_encrypt .

This involves extending `WebformSubmissionStorage` to perform encryption before data is inserted into the `webform_submission_data` table via the `saveData` method. This seemed to work nicely except for webform elements that extend `WebformComputedBase`.

It turns out that WebformComputedBase recalculates the stored computed value and updates the entry in the `webform_submission_data` table in the postSave method, which seems strange to me.

Maybe theres a case where this is necessary, but it seems strange to me that this is done post save.

Proposed resolution

Patch that allows for altering of fields before updating the `webform_submission_data` table attached.

Feature request
Status

Active

Version

6.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024