Skip to content

Commit 30d6807

Browse files
committed
Fix error messages showing for multiple forms on a single page
1 parent ecc6570 commit 30d6807

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/elements/Form.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ public function getCurrentSubmission()
652652
// See if there's a submission on routeParams - an error has occurred.
653653
$params = Craft::$app->getUrlManager()->getRouteParams();
654654

655-
if (isset($params['submission'])) {
655+
// Make sure to check the right submission
656+
if (isset($params['submission']) && $params['submission']->form->id == $this->id) {
656657
return $params['submission'];
657658
}
658659

0 commit comments

Comments
 (0)