jweiland / form-tools
A little collection of tools for TYPO3's EXT:form
Installs: 2 225
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 1
Type:typo3-cms-extension
Requires
- ext-dom: *
- ext-libxml: *
- typo3/cms-core: ^10.4.19 || ^11.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- nimut/testing-framework: ^6.0
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.5
Replaces
- typo3-ter/form_tools: 2.0.1
This package is auto-updated.
Last update: 2024-11-20 09:03:36 UTC
README
Form_tools is an extension for TYPO3 CMS. It collects some tools for the TYPO3 FormFramework.
1 Features
- It contains a form finisher to store all form fields as XML structure in DB
- It contains a form element to set up a GDPR link in your form (works with the form editor)
2 Usage
2.1 Installation
Installation using Composer
The recommended way to install the extension is using Composer.
Run the following command within your Composer based TYPO3 project:
composer require jweiland/form-tools
Installation as extension from TYPO3 Extension Repository (TER)
Download and install form_tools
with the extension manager module.
2.2 Minimal setup
- Check if DB table
tx_formtools_requests
was created successfully - Open your TypoScript file or record
- Add:
plugin.tx_form.settings.yamlConfigurations.1234 = EXT:form_tools/Configuration/Form/StoreAsXml.yaml
- Now you can use our finisher with identifier:
StoreFieldsAsXmlToDb
- Add:
plugin.tx_form.settings.yamlConfigurations.2345 = EXT:form_tools/Configuration/Form/Checkboxlink.yaml
- Add:
module.tx_form.settings.yamlConfigurations.2345 = EXT:form_tools/Configuration/Form/Checkboxlink.yaml
- Add:
to your SETUP and define a target for the "Data protection notice" link.lib.formLegalUid = TEXT lib.formLegalUid.value = 1 # or e.g.: {$form.legalUid}
- Now you can use the form element with type:
Checkboxlink
2.3 Finisher StoreFieldsAsXmlToDb
Copy the finisher to your form YAML file.
-
options:
-
table: tx_formtools_requests
mode: insert
elements:
text-1:
mapOnDatabaseColumn: first_name
name:
mapOnDatabaseColumn: last_name
telefon:
mapOnDatabaseColumn: telephone
strasse:
mapOnDatabaseColumn: address
plzort:
mapOnDatabaseColumn: city
email:
mapOnDatabaseColumn: email
textarea-2:
mapOnDatabaseColumn: message
databaseColumnMappings:
pid:
value: 12107
tstamp:
value: '{__currentTimestamp}'
crdate:
value: '{__currentTimestamp}'
identifier: StoreFieldsAsXmlToDb
- Some fields like
first_name
tillmessage
already exist in the Datatbase. You can map your renderables to them. - Set the pid where your mails should be saved (e.g. the same where your plugin resides).
- The database field
xml
will automaticaly contain all posted data.