BeforeFormValueIsRenderedEvent 

The event \TYPO3\CMS\Form\Event\BeforeFormValueIsRenderedEvent is dispatched before the value of a single form element is rendered, for example on the summary page or in an email. A listener can change the data that is passed to Fluid in $data, such as the processedValue, and add keys for custom templates. The form element and the form runtime are available in $element and $formRuntime.

Example: Show "Yes" or "No" for a checkbox on the summary page 

A checkbox shows its raw value on the summary page and in emails. The following listener sets the processedValue of every element of type Checkbox to "Yes" or "No":

EXT:my_extension/Classes/EventListener/CheckboxYesNoListener.php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\EventListener;

use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Form\Event\BeforeFormValueIsRenderedEvent;

final readonly class CheckboxYesNoListener
{
  #[AsEventListener(
    identifier: 'my-extension/checkbox-yes-no',
  )]
  public function __invoke(BeforeFormValueIsRenderedEvent $event): void
  {
    if ($event->element->getType() !== 'Checkbox') {
      return;
    }
    // Show "Yes" or "No" in the summary page and in the emails
    $event->data['processedValue'] = ($event->data['value'] ?? false)
      ? 'Yes'
      : 'No';
  }
}
Copied!

API 

final class BeforeFormValueIsRenderedEvent
Fully qualified name
\TYPO3\CMS\Form\Event\BeforeFormValueIsRenderedEvent

Listeners to this Event will be able to modify the data of a single form element, for example the human-readable "processedValue", before it is handed over to Fluid.

public data
public readonly element
public readonly formRuntime