Input is overridden by default value on preview

Created on 16 May 2024, 5 months ago
Updated 2 September 2024, 26 days ago

Problem/Motivation

If a form uses default values, those values override the given input on form preview.

Steps to reproduce

Configure a webform with formprocessor handler and default values. Enable preview. Load the form. Change a value. Load the form preview.

Proposed resolution

Don't set $element['#value'] in \Drupal\cmrf_form_processor\WebformSubmissionHandler::setDefaultValue().

Remaining tasks

Is it necessary to set the default value in the form state ($formState->setValue()) and the webform submission ($webformSubmission->setElementData())?

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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