Summary
When a WebformInherit-task (os2forms_forloeb) inherits a submission into a multi-page wizard, edits made on any page other than the final one are silently discarded on submit.
Reproduce
- Create a Maestro flow with a WebformInherit-task that inherits an earlier submission.
- Use a multi-page (wizard) webform with editable fields on at least two pages.
- Open the inherit task — fields prefill correctly from the inherited submission.
- Edit a field on page 1 and a field on page 2.
- Submit.
Go the submission and observe that only edits on the final page persists. Data on any other page reverts to the inherited value.
Cause
MaestroWebformInheritTask::webformSubmissionFormAlter() runs on hook_webform_submission_form_alter, which fires on every form build. Any time it runs it sets each field's value to the inherited value. As a result, page transitions also override previous page data.
Webform core guards its own pre-population against exactly this in WebformSubmissionForm::buildForm().
Fix
Add equivalent guard to the WebformInherit-task.
Test
Same as reproduce but with different result:
- Create a Maestro flow with a WebformInherit-task that inherits an earlier submission.
- Use a multi-page (wizard) webform with editable fields on at least two pages.
- Open the inherit task — fields prefill correctly from the inherited submission.
- Edit a field on page 1 and a field on page 2.
- Submit.
Go the submission and observe that all edited data persists.
Summary
When a WebformInherit-task (
os2forms_forloeb) inherits a submission into a multi-page wizard, edits made on any page other than the final one are silently discarded on submit.Reproduce
Go the submission and observe that only edits on the final page persists. Data on any other page reverts to the inherited value.
Cause
MaestroWebformInheritTask::webformSubmissionFormAlter()runs onhook_webform_submission_form_alter, which fires on every form build. Any time it runs it sets each field's value to the inherited value. As a result, page transitions also override previous page data.Webform core guards its own pre-population against exactly this in
WebformSubmissionForm::buildForm().Fix
Add equivalent guard to the WebformInherit-task.
Test
Same as reproduce but with different result:
Go the submission and observe that all edited data persists.