t3 / form-serialnumber
Provides serial number finisher for EXT:form
Package info
github.com/a-r-m-i-n/form_serialnumber
Language:Shell
Type:typo3-cms-extension
pkg:composer/t3/form-serialnumber
Requires
- php: ^8.1
- typo3/cms-core: ^12.4 || ^13.1 || ^14.3
- typo3/cms-form: ^12.4 || ^13.1 || ^14.3
Requires (Dev)
- armin/editorconfig-cli: ^2.0
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpstan/phpstan-doctrine: ^2.1
Suggests
None
Provides
None
Conflicts
None
Replaces
- typo3-ter/form-serialnumber: *
README
Provides serialnumber finisher for EXT:form
Features
- Adds finisher to EXT:form to generate serial numbers, which can be used in further finishers
- Serial numbers can get prefixed for output
- Current index/counter is stored in sys_registry
- You can reuse the same counter in different forms
Screenshots
Any form with this serialnumber finisher configured
get unique serialnumber, you can use in output and other finishers
Requirements
- PHP 8.1 or higher
- TYPO3 CMS 12.4, 13.4, or 14.3
- EXT:form installed
Installation
- Just install the extension in TYPO3.
- Register the form configuration:
- TYPO3 v12/v13: Add the static include "EXT:form Serialnumber Finisher" to your TypoScript template.
- TYPO3 v14: The configuration is automatically discovered through
Configuration/Form/Serialnumber/config.yaml. No static TypoScript include is needed.
- Clear the system caches.
Using the finisher
Configuration
The serialnumber finisher has some options you can use:
- identifier (string) Defines the name of the counter to use. With this option you can reuse the same counter in different forms, if you want.
- addField (boolean) When enabled a field is dynamically added to form runtime.
- fieldLabel: (string) Label of this field.
- prefix: (string) Set before current index. e.g "2019-" would provide "2019-123" serial number.
Also you can override the finisher settings in Flexform of form plugin content element, when you enable the "Override finisher settings" checkbox.
Variables
The serialnumber finisher provides two variables you can use in further finishers and templates.
{Serialnumber.serialnumber}
{Serialnumber.index}
Serialnumber contains configured prefix. Index is the id, stored in sys_registry.
sys_registry
TYPO3 provides a database table and a simple API to store informations which doesn't worth an own database table.
Here you can modify the value manually.
Caution: The values stored in sys_registry are serialized!
Example finisher configuration
In this configuration we use the {Serialnumber.serialnumber} variable from the previously configured
serialnumber finisher. Also because we've enabled the addField option, the mail will contain the
serialnumber as additional field.
finishers: - options: identifier: example addField: true fieldLabel: Seriennummer prefix: 2019- identifier: Serialnumber - options: subject: 'Formulareinsendung {Serialnumber.serialnumber}' recipientAddress: egal@ich.com recipientName: Ich senderAddress: egal@du.com senderName: Du replyToAddress: '' carbonCopyAddress: '' blindCarbonCopyAddress: '' format: html attachUploads: true translation: language: '' identifier: EmailToReceiver
Sponsor
This extension has been sponsored by:
zazudesign - die Schwarzwald Werbeagentur in Berlin
Digitalisierung, Projektierung digitaler Plattformen, Filmproduktion und TYPO3
- Web: https://www.zazudesign.de
- Email: thomas.hezel@zazudesign.de



