Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ before starting to add changes. Use example [placed in the end of the page](#exa

## [Unreleased]

- [337](https://github.com/OS2Forms/os2forms/pull/337)
Avoid inheriting data on page transition in MaestroWebformInheritTask.

## [5.1.0] 2026-06-03

- [PR-326](https://github.com/OS2Forms/os2forms/pull/326)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ public function prepareTaskForSave(array &$form, FormStateInterface $form_state,
* Implements hook_webform_submission_form_alter().
*/
public static function webformSubmissionFormAlter(array &$form, FormStateInterface $formState, string $formId) {
// Only inherit values on the initial form load. This skip condition is the
// complement of webform's own prepopulate guard.
// @see \Drupal\webform\WebformSubmissionForm::buildForm()
if ($formState->isRebuilding() && !$formState->get('is_ajax_restart')) {
return;
}

// @todo Clean up and align with MaestroHelper::maestroZeroUserNotification().
if ($queueID = self::getQueueIdFromRequest()) {
$templateTask = MaestroEngine::getTemplateTaskByQueueID($queueID);
Expand Down
Loading