Review main Merged

92854[FEATURE] Introduce custom message in form email finisher

Josua Vogel CR +2 V +2 Normal +181 −6 updated 02/28/26, 08:07

Commit message

The EmailToSender and EmailToReceiver finishers now support an
optional "message" field that allows editors to add a custom
message to the emails sent by the form framework.

The message field supports rich text editing using the
"form-content" RTE preset (bold, italic, links, lists) and is
available in:
- The form editor backend module
- The form finisher override settings

A special {formValues} placeholder can be used within the message
to control where the submitted form data table is rendered. If the
placeholder is omitted, only the custom message is shown and the
form values table is hidden entirely.

The EmailFinisher splits the message around the {formValues}
placeholder and assigns "messageBefore" and "messageAfter"
variables to the Fluid email templates. Both the HTML and
plaintext email templates have been updated to support the new
message variables with proper sanitization.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Sven Liebert +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Sven Liebert +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 1013

  1. Josua Vogel uploaded patch set 1 02/15/26, 18:41

  2. core-ci voted on patch set 1 V +1 02/15/26, 19:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95936

  3. Josua Vogel uploaded patch set 2 V +1 02/21/26, 15:08

  4. core-ci voted on patch set 2 V +1 02/21/26, 15:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96453

  5. Josua Vogel commented on patch set 2 02/21/26, 15:24

    In addition this patch contains a bugfix concerning receiving the Rte config for finishers
  6. Garvin Hicking commented on patch set 2 02/22/26, 00:03

    EmailFinisher.php:150

    This is creative but will fail when people use this placeholder multiple times. I guess throwing an exception for more than once occurence would be fine? Maybe also mention that in the docs and GUI label?
  7. Josua Vogel commented on patch set 2 02/22/26, 14:18

    EmailFinisher.php:150 Reply

    Good point — I actually considered this during the implementation. From a developer’s perspective, throwing an exception initially felt like the correct approach, since multiple occurrences of the placeholder are not intended or desirable. However, I also tried to look at it from a different angle. Raising an exception would result in an error message being shown to the end customer. In contrast, if a second placeholder is used, it is simply rendered as plain text in the email. Personally, I consider an incorrectly placed second marker to be less critical than blocking the form submission with an error message. We also do not validate spelling or similar content issues — it is ultimately the editor’s responsibility to ensure that the email message is properly written and reviewed before going live. If a template is published without proper checking, having {formValues} appear in the success message is, in my opinion, a reasonable trade-off compared to displaying an error to the end customer. I will improve the situation by extending the notice in the backend.
  8. Josua Vogel uploaded patch set 3 V +1 02/22/26, 14:21

  9. core-ci voted on patch set 3 V +1 02/22/26, 15:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96507

  10. Garvin Hicking commented on patch set 3 CR +1 V +1 02/27/26, 09:29

    EmailFinisher.php:150 Reply

    Thanks! This works for me.
  11. Sven Liebert voted on patch set 3 CR +1 V +1 02/27/26, 11:39

  12. Garvin Hicking voted on patch set 3 CR +2 V +2 02/28/26, 08:07

  13. Garvin Hicking merged patch set 4 02/28/26, 08:07