Submitted values are overwritten by default values from CiviCRM

Created on 19 March 2024, 8 months ago
Updated 23 April 2024, 7 months ago

Problem/Motivation

We have an issue where submitted values are overwritten by default values from CiviCRM. The culprit is Drupal\cmrf_form_processor\WebformSubmissionHandler::alterForm(): it checks if $form_state->isSubmitted(), but this is still FALSE in our case since the form is still submitting. The method is indirectly triggered by Drupal\webform\WebformSubmissionForm::submitWebformSubmission().

Proposed resolution

Check in a different way if the form already has values. Maybe on a per-field basis with $webformSubmission->getElementData()?

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024