Search code examples
typo3typo3-9.x

SaveToDatabase with MultiCheckbox in FORM: how to save values in sys_category_record_mm


i use the finisher SaveToDatabase in FORM to save form entries in a table of an extension. With normal database fields there is no problem, but i need to link categories from sys_category with the database entry. I do have a MultiCheckbox field in the form for the categories:

type: MultiCheckbox
identifier: category
properties: 
  options: 
    11: 'option1'
    12: 'option2'

.... and so on. I tried to write an entry in 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

thats obviously wrong ... i do not know how to address the values from the MultiCheckbox field.

Any help? Thanks!


Solution

  • It seems there is no solution for this problem as described in in this bug report:

    https://forge.typo3.org/issues/85772

    I have to write my own finisher.

    Thanks TYPO3UA!