TCA: using addRecord in a selectMultipleSideBySide select field overwrites existing data
Let's assume a TCA has a configuration like this:
'config' => [ 'type' => 'select', 'renderType' => 'selectMultipleSideBySide', [..], 'fieldControl' => [ 'addRecord' => [ 'disabled' => true, 'options' => [ 'pid' => '9', //hardcoded! [...]
On clicking the "addRecord" button, a new record can be created, which will be saved on a page with uid 9. Saving and closing leads back to the original form and fills the select list with the new record - REMOVING any other that might have already existed.
The expected behaviour would be to add the new record to the existing record.
(I would have liked to assign this issue to TCA, but the category list does not offer such a category. Therefore I assign it to FormFramework - unsure if this is the right place.)
PS: there are no examples in the documentation on how to create entries for markers that can be used with addRecord.
PPS: It is mentioned that markers can be defined in PageTS (again: example missing), but wouldn't it be better to fetch a marker from the setup.ts? Defining folder ids, where records may/must be created, in 2 possible places (setup.ts and pagets) seems double the trouble...
#5 Updated by Robert Wildling 4 months ago
The current issue is still valid as the configuration of a ###PAGE_TSCONFIG_PID### or any other in the "addRecord" section does not do anything. Meaning: If a new record is edited by clicking on the relevant button in the multiSelectSideBySide box, the new record is saved on the SAME page instead of on the page with the pid ###PAGE_TSCONFIG_PID###.