pagemachine / typo3-formlog
Form log for TYPO3
Installs: 204 553
Dependents: 4
Suggesters: 0
Security: 0
Stars: 22
Watchers: 7
Forks: 18
Open Issues: 16
Type:typo3-cms-extension
pkg:composer/pagemachine/typo3-formlog
Requires
- php: ^8.1
- league/csv: ^9.1
- nimmneun/onesheet: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0 || ^2.0
- psr/log: ^1.0 || ^2.0 || ^3.0
- typo3/cms-backend: ^12.4 || ^13.4
- typo3/cms-core: ^12.4 || ^13.4
- typo3/cms-extbase: ^12.4 || ^13.4
- typo3/cms-fluid: ^12.4 || ^13.4
- typo3/cms-form: ^12.4 || ^13.4
- typo3/cms-frontend: ^12.4 || ^13.4
- typo3/cms-install: ^12.4 || ^13.4
- typo3fluid/fluid: ^2.3 || ^4.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.3
- friendsofphp/php-cs-fixer: ^3.41
- helmich/typo3-typoscript-lint: ^3.0
- jangregor/phpstan-prophecy: ^1.0.0 || ^2.0.0
- michielroos/typo3scan: ^1.7
- php-parallel-lint/php-console-highlighter: ^1.0.0
- php-parallel-lint/php-parallel-lint: ^1.2
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^1.0.0 || ^2.0.0
- phpunit/phpunit: ^10.0 || ^11.0 || ^12.0
- rector/rector: ^1.0.0 || ^2.0.0
- saschaegerer/phpstan-typo3: ^1.0.0 || ^2.0.0
- sclable/xml-lint: ^0.8.0
- ssch/typo3-rector: ^2.2 || ^3.0
- typo3/cms-fluid-styled-content: ^12.4 || ^13.4
- typo3/cms-scheduler: ^12.4 || ^13.4
- typo3/coding-standards: ^0.8.0
- typo3/testing-framework: ^8.0 || ^9.0
Suggests
- typo3/cms-scheduler: Allows automatic deletion of old form log entries.
Replaces
- typo3-ter/formlog: 2.4.3
This package is auto-updated.
Last update: 2025-10-12 15:44:08 UTC
README
Form log for TYPO3
Installation
This extension is installable from various sources:
-
Via Composer:
composer require pagemachine/typo3-formlog
-
From the TYPO3 Extension Repository
Purpose
One feature absent in the TYPO3 form extension is logging of form data. If you have ever used the now defunct Formhandler extension you know how valuable this can be. You can easily check if form submissions are working as they should, see internal values are generated correctly and perform some basic analysis thanks to exports to CSV or similar.
See our blog post about the TYPO3 form log extension.
Start logging
Logging can be enabled for any form by adding the LogFormData finisher to its form definition:
finishers: - ... - identifier: LogFormData - identifier: Redirect
The LogFormData finisher should be the last finisher or right before the Redirect finisher if used. Logging after a redirect is not possible.
Additional variables stored in the FinisherVariableProvider can also be logged by using the finisherVariables option:
- identifier: LogFormData options: finisherVariables: MyCustomFinisher: - myCustomVariable
The keys within finisherVariables are identifiers of finishers used in a form, the value of each entry is a list of finisher variable names. In the example here the finisher variable myCustomVariable provided by the finisher MyCustomFinisher will be logged.
Form log module
By default the form log module displays a few basic fields like page, form identifier, language and date of form submission as columns.
Additional columns can be added with the list.columns setting in ext_typoscript_setup.txt:
module.tx_formlog {
settings {
list {
columns {
100 {
property = data.email
label = LLL:EXT:my_site/Resources/Private/Language/Extensions/Form/locallang.xlf:element.email.properties.label
}
}
}
}
}
Within list.columns an arbitrary list of columns can be added where the property option refers to a property path in the FormLogEntry domain model. Simply speaking data.* provides access to form data by a form element identifier, e.g. data.email for the value of the form element email. The label option is used to retrieve a translatable label. Usually one can simply use the same label that is used for the field within the form itself.
Similarly finisherVariables.* does the same for additional finisher variables by utilizing the finisher identifier and variable name:
module.tx_formlog {
settings {
list {
columns {
200 {
property = finisherVariables.MyCustomFinisher.myCustomVariable
label = LLL:EXT:my_site/Resources/Private/Language/Extensions/Formlog/locallang.xlf:formlog.entry.finisherVariables.MyCustomFinisher.myCustomVariable
}
}
}
}
}
Here myCustomVariable of MyCustomFinisher is added as column to the list.
Form log export
Out of the box form log entries can be exported to CSV and Excel (XLSX). Basic fields of form log entries are exported by default, additional columns can be added with the export.columns setting in ext_typoscript_setup.txt which is configured exactly the same as the list.columns setting:
module.tx_formlog {
settings {
export {
columns {
100 {
property = data.firstname
label = LLL:EXT:my_site/Resources/Private/Language/Extensions/Form/locallang.xlf:element.firstname.properties.label
}
101 {
property = data.lastname
label = LLL:EXT:my_site/Resources/Private/Language/Extensions/Form/locallang.xlf:element.lastname.properties.label
}
102 {
property = data.email
label = LLL:EXT:my_site/Resources/Private/Language/Extensions/Form/locallang.xlf:element.email.properties.label
}
200 {
property = finisherVariables.MyCustomFinisher.myCustomVariable
label = LLL:EXT:my_site/Resources/Private/Language/Extensions/Formlog/locallang.xlf:formlog.entry.finisherVariables.MyCustomFinisher.myCustomVariable
}
}
}
}
}
Log entry cleanup
The Table garbage collection Scheduler task can be set up to automatically delete old form log entries. Select tx_formlog_entries as Table to clean up and a suitable value for Delete entries older than given number of days, 180 by default.
Testing
All tests can be executed with the shipped Docker Compose definition:
docker compose run --rm app composer build
Thanks
Development of this package was proudly sponsored by TÜV Hessen.