---
title: "Feature: #109811 - PSR-14 event AfterFormStateInitializedEvent"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-109811-1759230000"
source: "Changelog/15.0/Feature-109811-PSR14AfterFormStateInitializedEvent.rst"
modified: "2026-09-15T10:46:36+00:00"
---

# Feature: #109811 - PSR-14 event AfterFormStateInitializedEvent

See [forge#109811](https://forge.typo3.org/issues/109811)

## Description

A new PSR-14 event `\TYPO3\CMS\Form\Event\AfterFormStateInitializedEvent`
has been introduced. It serves as an improved replacement for the now
[removed](https://docs.typo3.org/permalink/changelog:breaking-109811-1759230001) hook
`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['afterFormStateInitialized']`.

The new event is dispatched by `FormRuntime` after the `FormState`
has been restored from the request. At this point both the form state
(submitted values) and the static form definition are available, which makes
it particularly suitable for enriching components that need runtime data (e.g.
configuring property mapping for file uploads).

The event provides the following public properties:

-   `$formRuntime`: The form runtime object (read-only).
-   `$request`: The current request (read-only).

## Example

An example event listener could look like this:

**EXT:my_extension/Classes/EventListener/MyAfterFormStateInitializedEventListener.php**

```php
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Form\Event\AfterFormStateInitializedEvent;

#[AsEventListener(identifier: 'my-extension/after-form-state-initialized')]
final readonly class MyAfterFormStateInitializedEventListener
{
    public function __invoke(AfterFormStateInitializedEvent $event): void
    {
        // Access $event->formRuntime->getFormState() here
    }
}
```

## Impact

With the new `AfterFormStateInitializedEvent`,
it is now possible to react to the form state being fully initialized using the
standard PSR-14 event listener mechanism.
