extrameile / em_form_repeatablesave
Allows saving of form elements which are repeatable.
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 2
Open Issues: 2
Type:typo3-cms-extension
Requires
- php: >=7.2.0 <7.4.99
- typo3/cms-core: ^8.7.0 || ^9.5.0
- typo3/cms-form: ^8.7.0 || ^9.5.0
Requires (Dev)
- extrameile/grumphp-conventions-typo3: dev-master
- typo3/testing-framework: ^4.14.0
Suggests
- tritum/repeatable-form-elements: You may want the repeatable container from TRITUM
Replaces
- typo3-ter/em_form_repeatablesave: 1.0.1
This package is auto-updated.
Last update: 2024-11-29 05:51:25 UTC
README
TYPO3 EXT:form save to database finisher for repeatable data
The TYPO3 extension allows to save repeatable data into database tables like the SaveToDatabaseFinisher from core. To create forms with repeatable data in TYPO3 v8 LTS, you can use the repeatable_form_elements extension from TRITUM https://github.com/tritum/repeatable_form_elements
Usage
The finisher is used like the SaveToDatabase finisher from TYPO3 Core. It only introduce a new option called "repeat", if it isn't set, the core code path is used. If you set it to the identifier of a repeating container it will use this one to save data repeatingly to the table.
Example
finishers:
-
options:
-
table: fe_users
mode: insert
databaseColumnMappings:
pid:
value: '1'
crdate:
value: '{__currentTimestamp}'
tstamp:
value: '{__currentTimestamp}'
tx_extbase_type:
value: Tx_Extbase_Domain_Model_FrontendUser
elements:
username:
mapOnDatabaseColumn: username
email:
mapOnDatabaseColumn: email
-
table: fe_users_locations
mode: insert
repeat: locationcontainer
databaseColumnMappings:
pid:
value: '1'
crdate:
value: '{__currentTimestamp}'
tstamp:
value: '{__currentTimestamp}'
fe_user:
value: '{SaveRepeatableToDatabase.insertedUids.1}'
elements:
locationstreet:
mapOnDatabaseColumn: street
locationplace:
mapOnDatabaseColumn: place
locationzip:
mapOnDatabaseColumn: zip
locationcity:
mapOnDatabaseColumn: city
-
table: fe_users
mode: update
whereClause:
uid: '{SaveRepeatableToDatabase.insertedUids.0}'
databaseColumnMappings:
locations:
value: '{SaveRepeatableToDatabase.countInserts.1}'
identifier: SaveRepeatableToDatabase
Hint
This implementation won't work with nested repeatable form elements.