Skip to content
Corex

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.

__construct(string $formSlug, array $values)

Section titled “__construct(string $formSlug, array $values)”

Said by whatever stored the submission. The first id is kept: a submission stored twice is found where it was first put.

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.

How the notification email went, or null when no listener said.