Skip to content

Commit

Permalink
Merge pull request #160 from neos/bugfix/156-make-form-state-availabl…
Browse files Browse the repository at this point in the history
…e-onsubmit

BUGFIX: Update form state upon element submission
  • Loading branch information
bwaidelich authored Sep 13, 2022
2 parents 531f971 + da67cfa commit 2a4cd1f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Classes/Core/Runtime/FormRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,9 @@ protected function mapAndValidatePage(Page $page)
$element->onSubmit($this, $value);

$pageFormValues[$element->getIdentifier()] = $value;
$this->formState->setFormValue($element->getIdentifier(), $value);
}
$page->onSubmit($this, $pageFormValues);
foreach ($pageFormValues as $elementIdentifier => $value) {
$this->formState->setFormValue($elementIdentifier, $value);
}

// The more parts the path has, the more early it is processed
usort($propertyPathsForWhichPropertyMappingShouldHappen, function ($a, $b) {
Expand Down

0 comments on commit 2a4cd1f

Please sign in to comment.