Review main Abandoned

89308[TASK] Dispatch event if `SubmitInterceptor` intercepted the submission

Andreas Kienast CR -2 V +1 Easy +20 −1 updated 03/11/26, 16:25

Commit message

The module `@typo3/backend/form/submit-interceptor` may be used to
install interceptors that prevent the submission of a form. The mostly
well-known usage is the FormEngine validation.

If the form submission is intercepted (and thus aborted), a new event
`typo3:form:submit-intercepted` is now dispatched which contains the
`SubmitEvent` as its payload. This allows to react on intercepted
submissions and e.g. do cleanup tasks.

Review

  • Code review CR -2
    • Andreas Kienast -2
    • Georg Ringer +1
  • Verified V +1
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 68

  1. Andreas Kienast uploaded patch set 1 05/06/25, 08:53

  2. Andreas Kienast updated the commit message in patch set 2 05/06/25, 08:54

  3. core-ci voted on patch set 1 V +1 05/06/25, 09:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78589

  4. core-ci voted on patch set 2 V +1 05/06/25, 09:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/78590

  5. Georg Ringer voted on patch set 2 CR +1 V +1 05/17/25, 08:20

  6. Benjamin Franzke commented on patch set 2 06/03/25, 06:26

    Wouldn't this also be possible using a submit event listener that checks for `e.defaultPrevented`? Do you have an example patch that makes use of this functionality?
  7. Andreas Kienast commented on patch set 2 CR -2 06/06/25, 11:54

    Reply Unresolved

    There's no guaranteed order when event listeners are registered. It may happen that your listener that checks for `e.defaultPrevented` is called before the ones registered in `SubmitInterceptor`. I do not have an example patch at hand to prove this.
  8. Andreas Kienast abandoned the change 03/11/26, 16:25

    Not planning to work on this soon.