FormSubmittedEvent
Corex\Forms\Submission\FormSubmittedEvent · class · Forms layer
Dispatched once a submission passes the security gate and validation. Carries the form slug and the validated/normalized values for the listeners, and neither changes. Two things are learned while the listeners run. Which stored submission this became: whatever stores it says so, and a listener that runs after it can point at the submission, as a notification email does (spec 081, US3). And how the form’s notification email went: whatever sent it says so, and the notification centre is told of one that did not go. A form’s listeners run in the order it lists them, and both are read once they have all run.
Public API
Section titled “Public API”__construct(string $formSlug, array $values)
Section titled “__construct(string $formSlug, array $values)”storedAs(int $submissionId): void
Section titled “storedAs(int $submissionId): void”Said by whatever stored the submission. The first id is kept: a submission stored twice is found where it was first put.
submissionId(): ?int
Section titled “submissionId(): ?int”The stored submission’s id, or null when nothing has stored it: the form does not store, or this listener runs before the one that does.
notifiedAs(NotificationDelivery $delivery): void
Section titled “notifiedAs(NotificationDelivery $delivery): void”Said by whatever sent the form’s notification email. A delivery that failed is kept: of two emails where one did not go, the one somebody has to look at is that one.
delivery(): ?NotificationDelivery
Section titled “delivery(): ?NotificationDelivery”How the notification email went, or null when no listener said.