Skip to content

WebformInheritTask loses edits on all but the latest wizard page #336

Closed

Description

@jekuaitk

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

  1. Create a Maestro flow with a WebformInherit-task that inherits an earlier submission.
  2. Use a multi-page (wizard) webform with editable fields on at least two pages.
  3. Open the inherit task — fields prefill correctly from the inherited submission.
  4. Edit a field on page 1 and a field on page 2.
  5. 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:

  1. Create a Maestro flow with a WebformInherit-task that inherits an earlier submission.
  2. Use a multi-page (wizard) webform with editable fields on at least two pages.
  3. Open the inherit task — fields prefill correctly from the inherited submission.
  4. Edit a field on page 1 and a field on page 2.
  5. Submit.

Go the submission and observe that all edited data persists.

Activity

  1. added theissue type on Jun 26, 2026
  2. ds-bellcom commented on Aug 25, 2026

    @ds-bellcom
    Contributor

    @OS2Forms/koordinationsgruppe som skrevet inde på #337, så estimerer vi 1 time til review på denne opgave.

  3. jekuaitk commented on Sep 15, 2026

    @jekuaitk
    ContributorAuthor

    @ds-bellcom This is superseded by #352. The change in the PR relating to that issue will inadvertently solve this issue!

  4. ds-bellcom commented on Sep 15, 2026

    @ds-bellcom
    Contributor

    @ds-bellcom This is superseded by #352. The change in the PR relating to that issue will inadvertently solve this issue!

    @jekuaitk eller @gBarlach vil I ikke lukke de issues og evt. PR, som ikke længere er aktuelle, således at vi kun har de issues der stadig er aktuelle tilbage?

  5. removed theissue type on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions