Change record status: 
Project: 
Introduced in branch: 
8.x-5.x
Introduced in version: 
8.x-5.5-beta2
Description: 

Problem

When creating or updating a submission, the webform element's #default_value and #value were not included in the submission' data. (\Drupal\webform\WebformSubmissionInterface::getData). This resulted in any computed elements or tokens that rely on another element's default value to not work as expected.

Solution

The Webform entity now has a \Drupal\webform\WebformInterface::getElementsDefaultData which extracts the #default_value and #value from every element and now \Drupal\webform\WebformSubmissionForm::setEntity will apply the default data to webform submission's data.

This change is primarily an API improvement that only affects broken edge cases and should not have an impact on existing webforms.

Impacts: 
Site builders, administrators, editors
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done