# Form log ![CI](https://github.com/pagemachine/typo3-formlog/workflows/CI/badge.svg) Form log for TYPO3 ## Installation 1. Via [Composer](https://packagist.org/packages/pagemachine/typo3-formlog): ```shell composer require pagemachine/typo3-formlog ``` From the [TYPO3 Extension Repository](https://extensions.typo3.org/extension/formlog/) 2. Add the Site Set `pagemachine/formlog` as dependency to your site configuration: ```yaml dependencies: - pagemachine/formlog ``` Alternatively add the "Form Log" static TypoScript template or import the TypoScript setup: ```typoscript @import 'EXT:formlog/Configuration/TypoScript/setup.typoscript' ``` ## Purpose One feature absent in the [TYPO3 form extension](https://docs.typo3.org/typo3cms/extensions/form/) 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](https://www.pagemachine.de/blog/typo3-form-log/). ## Start logging Logging can be enabled for any form by adding the `LogFormData` finisher to its form definition: ```yaml 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: ```yaml - 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 TypoScript loaded via `ext_localconf.php`: ```php ExtensionManagementUtility::addTypoScriptSetup(<<