extrameile / em_form_repeatablesave
允许保存可重复的表单元素。
1.0.1
2022-01-31 09:36 UTC
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-08-29 05:16:14 UTC
README
TYPO3 EXT:form 重复数据保存到数据库扩展
此TYPO3扩展允许将重复数据保存到数据库表中,类似于核心中的SaveToDatabaseFinisher。要在TYPO3 v8 LTS中创建具有重复数据的表单,您可以使用TRITUM的repeatable_form_elements扩展https://github.com/tritum/repeatable_form_elements
使用方法
此终结器类似于TYPO3 Core中的SaveToDatabase终结器。它仅引入了一个名为“repeat”的新选项,如果未设置,则使用核心代码路径。如果将其设置为重复容器的标识符,则将使用此选项重复地将数据保存到表中。
示例
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
提示
此实现不适用于嵌套的重复表单元素。