在 FORM 中使用 MultiCheckbox 的 SaveToDatabase:如何在 sys_category_record_mm 中保存值
SaveToDatabase with MultiCheckbox in FORM: how to save values in sys_category_record_mm
我使用 FORM 中的整理器 SaveToDatabase 将表单条目保存在扩展的 table 中。使用普通数据库字段没有问题,但我需要 sys_category 中的 link 类别与数据库条目。我在类别的表单中有一个 MultiCheckbox 字段:
type: MultiCheckbox
identifier: category
properties:
options:
11: 'option1'
12: 'option2'
.....等等。我试图在 sys_category_record_mm 中写一个条目:
table: sys_category_record_mm
mode: insert
databaseColumnMappings:
uid_foreign:
value: '{SaveToDatabase.insertedUids.0}'
tablenames:
value: 'tx_myext_mytable'
fieldname:
value: 'categories'
sorting:
value: '0'
sorting_foreign:
value: '1'
elements:
category.11:
mapOnDatabaseColumn: uid_local
skipIfValueIsEmpty: true
这显然是错误的...我不知道如何处理 MultiCheckbox 字段中的值。
有什么帮助吗?
谢谢!
这个错误报告中描述的问题似乎没有解决方案:
https://forge.typo3.org/issues/85772
我必须自己编写整理器。
感谢 TYPO3UA!
我使用 FORM 中的整理器 SaveToDatabase 将表单条目保存在扩展的 table 中。使用普通数据库字段没有问题,但我需要 sys_category 中的 link 类别与数据库条目。我在类别的表单中有一个 MultiCheckbox 字段:
type: MultiCheckbox
identifier: category
properties:
options:
11: 'option1'
12: 'option2'
.....等等。我试图在 sys_category_record_mm 中写一个条目:
table: sys_category_record_mm
mode: insert
databaseColumnMappings:
uid_foreign:
value: '{SaveToDatabase.insertedUids.0}'
tablenames:
value: 'tx_myext_mytable'
fieldname:
value: 'categories'
sorting:
value: '0'
sorting_foreign:
value: '1'
elements:
category.11:
mapOnDatabaseColumn: uid_local
skipIfValueIsEmpty: true
这显然是错误的...我不知道如何处理 MultiCheckbox 字段中的值。
有什么帮助吗? 谢谢!
这个错误报告中描述的问题似乎没有解决方案:
https://forge.typo3.org/issues/85772
我必须自己编写整理器。
感谢 TYPO3UA!