Skip to content

Commit

Permalink
Form: does not show 'no associated handlers' error if the form is not…
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 6, 2024
1 parent 0b29dfb commit ea51d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public function fireEvents(): void
$this->validate();
}

$handled = count($this->onSuccess ?? []) || count($this->onSubmit ?? []);
$handled = count($this->onSuccess ?? []) || count($this->onSubmit ?? []) || $this->submittedBy === true;

if ($this->submittedBy instanceof Controls\SubmitButton) {
$handled = $handled || count($this->submittedBy->onClick ?? []);
Expand Down

0 comments on commit ea51d83

Please sign in to comment.