Review 14.3 Merged

95447[BUGFIX] Use translated option labels in form finisher output

Benjamin Kott CR +2 V +2 Expert +1352 −163 updated 08/27/26, 09:02

Commit message

Finisher options substitute {elementIdentifier} placeholders with the
submitted value of a form element. A select, radio button, multi
checkbox or country select therefore contributed its stored option key
where a human reads the result: the subject of an email said "Request
from mr" while the summary table below it said "Request from Mister".

Value resolution now lives in a dedicated FormValueResolver, shared by
the RenderFormValue ViewHelper and AbstractFinisher, so the summary
page, the email body and the subject line agree on what a submitted
value looks like. A form element contributes its own representation by
implementing ProcessableValueFormElementInterface, which Date,
FileUpload, CountrySelect and the new GenericOptionableFormElement do.

A finisher opts a single option into that resolution by reading it
with parseOptionAsDisplayValue() instead of parseOption(). The email
finisher does so for subject, title, message and senderName, the
confirmation finisher for message, the flash message finisher for
messageBody and messageTitle. Every other option keeps the submitted
value, which is what the column mappings and the whereClause of the
SaveToDatabase finisher, the redirect targets and the email addresses
beside the sender name need.

The two new element classes extend GenericFormElement rather than
AbstractFormElement, so an instanceof check against the class these
elements used before keeps matching.

An array interpolated into a longer string is now joined instead of
aborting the finisher; an array carrying an object that cannot be
converted to a string still throws.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
  • Verified V +2 Done
    • Benjamin Kott +2
    • core-ci +1 CI

Issues 3

Files 26

Show 6 more files

Review log 57

  1. Benjamin Kott commented on patch set 1 08/27/26, 08:25

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/form/Classes/ViewHelpers/RenderFormValueViewHelper.php * typo3/sysext/form/Tests/Functional/Domain/Finishers/EmailFinisherTest.php * typo3/sysext/form/Tests/Unit/Domain/Finishers/AbstractFinisherTest.php
  2. core-ci voted on patch set 1 V -1 08/27/26, 08:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107225

  3. Benjamin Kott uploaded patch set 2 V -1 08/27/26, 08:38

  4. Benjamin Kott commented on patch set 2 08/27/26, 08:38

    This change is ready for review.
  5. core-ci voted on patch set 2 V +1 08/27/26, 08:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107226

  6. Benjamin Kott voted on patch set 2 CR +2 V +2 08/27/26, 09:01

  7. Benjamin Kott merged patch set 3 08/27/26, 09:02