extrameile/em_form_repeatablesave

允许保存可重复的表单元素。

安装: 19

依赖: 0

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 2

开放问题: 2

类型:typo3-cms-extension

1.0.1 2022-01-31 09:36 UTC

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

提示

此实现不适用于嵌套的重复表单元素。