#85772EXT:form SaveToDatabaseFinisher cannot handle multi value fields
Description
[..]
properties:
options:
1: 'Label 1'
2: 'Label 2'
type: MultiSelect
identifier: categories
label: 'Multi select'
defaultValue:
- '2'
[...]
uid_foreign:
value: '{SaveToDatabase.insertedUids.0}'
[...]
If I save only one value and not empty, work it. If a value more one it not work
I mean this is about `type: MultiSelect` and `type: ImageUpload`.
How to work with `SaveToDatabase` if I to pass for saving in the DB not one value and two value or three and more
Reviews 1
Related issues 2
History 2143
Show 18 earlier messages
-
Vasyl Mosiychuk changed Related to #85216 <span data-processor="relativetime" data-value="2018-08-07T13:44:31+00:00" > 08/07/18, 13:44 </span>
-
Vasyl Mosiychuk changed Related to #85378 <span data-processor="relativetime" data-value="2018-08-07T13:45:04+00:00" > 08/07/18, 13:45 </span>
-
Susanne Moog changed subject
I can not saving in the DB values if I pass for saving in the DB not one value and two value or three and more?EXT:form SaveToDatabaseFinisher cannot handle multi value fields <span data-processor="relativetime" data-value="2018-09-02T17:38:15+00:00" > 09/02/18, 17:38 </span> -
Susanne Moog changed target version <span data-processor="relativetime" data-value="2018-09-03T14:43:32+00:00" > 09/03/18, 14:43 </span>
-
Björn Jacob changed Sprint Focus Remote Sprint <span data-processor="relativetime" data-value="2019-04-04T20:19:41+00:00" > 04/04/19, 20:19 </span>
-
Michael Waack changed assigned to Michael Waack <span data-processor="relativetime" data-value="2019-04-26T16:28:05+00:00" > 04/26/19, 16:28 </span>
-
Michael Waack changed removed the assignee <span data-processor="relativetime" data-value="2019-04-26T16:28:28+00:00" > 04/26/19, 16:28 </span>
-
Björn Jacob changed Sprint Focus
Remote Sprint<span data-processor="relativetime" data-value="2019-04-27T22:34:10+00:00" > 04/27/19, 22:34 </span> -
Vasyl Mosiychuk commented <span data-processor="relativetime" data-value="2019-04-28T20:17:45+00:00" > 04/28/19, 20:17 </span>
Susanne Moog wrote:
> The SaveToDatabase finisher was originally meant to provide a starting point for custom implementations and is therefor currently not capable of rendering all possible fields and combinations. In stable releases it should be used for very simple forms or as code tutorial on how to develop own finishers.
>
> For future versions we need to define a concept of how and what we want to ship with the core.In to manual not said nothing about that the `ext:from` … should be used for very simple forms or as code tutorial on how to develop own finishers, as for a non-technical editor, so and as an experienced integrator.
I think the `ext:form` is should provide possibility to save all data in the database which sent from the form.
In this case TYPO3 and the `ext:from` will be available for all users, and really will be simple and easy…
-
Björn Jacob commented and changed target version <span data-processor="relativetime" data-value="2019-04-28T21:10:39+00:00" > 04/28/19, 21:10 </span>
If you want to store the form data in your database, try this extension: https://github.com/pagemachine/typo3-formlog.
-
Vasyl Mosiychuk commented <span data-processor="relativetime" data-value="2019-04-29T22:04:50+00:00" > 04/29/19, 22:04 </span>
Bjoern Jacob wrote:
> If you want to store the form data in your database, try this extension: https://github.com/pagemachine/typo3-formlog.No, this is not that what need…
I need save data in the table of database for example extension news or other extension where is in the record has more one category and more one images.
-
Susanne Moog commented <span data-processor="relativetime" data-value="2019-04-29T22:55:23+00:00" > 04/29/19, 22:55 </span>
The problem is, we will not be able to support arbitrary use cases. One use case could be to have categories as csv – kind of a log entry -, the next wants the categories created and saved as 1:n relation, next is m:m relation and so on. We have no secure way of figuring out what kind of form people are building and guessing will make the situation worse. Trying to support any kind of datastructures will be extremely complicated, quite impossible to get right and complex – whereas creating an own finisher for your specific case should be a lot more straightforward, as you – and only you – know exactly what you are building and what the logic should be for the relations.
The only reliable configuration source we have for tables with relations at the moment would be TCA, which would essentially mean, rebuilding form engine (backend forms) for the frontend – that however would not be a task for the form framework, but rather a separate package.
-
Vasyl Mosiychuk commented <span data-processor="relativetime" data-value="2019-05-24T11:39:50+00:00" > 05/24/19, 11:39 </span>
Susanne Moog wrote:
> The problem is, we will not be able to support arbitrary use cases. One use case could be to have categories as csv – kind of a log entry -, the next wants the categories created and saved as 1:n relation, next is m:m relation and so on. We have no secure way of figuring out what kind of form people are building and guessing will make the situation worse. Trying to support any kind of datastructures will be extremely complicated, quite impossible to get right and complex – whereas creating an own finisher for your specific case should be a lot more straightforward, as you – and only you – know exactly what you are building and what the logic should be for the relations.
>
> The only reliable configuration source we have for tables with relations at the moment would be TCA, which would essentially mean, rebuilding form engine (backend forms) for the frontend – that however would not be a task for the form framework, but rather a separate package.…and there are not so many cases, mainly it is “categories” and “tags” and “sys_file_reference”.
at least core “sys_category” and “sys_file_reference” would be well
I think, that need describing in the documentation about those cases. Can you describe in documentation create own finisher for this case as an example?
-
Susanne Moog changed Sprint Focus Remote Sprint <span data-processor="relativetime" data-value="2019-11-17T18:25:07+00:00" > 11/17/19, 18:25 </span>
-
Mathias Brodala changed Tags Documentation <span data-processor="relativetime" data-value="2019-11-22T14:05:01+00:00" > 11/22/19, 14:05 </span>
-
Julian Stock commented <span data-processor="relativetime" data-value="2020-08-13T22:41:02+00:00" > 08/13/20, 22:41 </span>
Vasyl Mosiychuk wrote:
> […]
> I think, that need describing in the documentation about those cases. Can you describe in documentation create own finisher for this case as an example?Do you still need help? I managed to get some sys_category in the ext:form frontend via a custom formElementsDefinition (in yaml & php, mainly following this: https://daniel-siepmann.de/posts/2017/how-to-create-typo3-form-select-element-with-options-selected-from-database.html), set it to MultiSelect and used the default (but extended) SaveToDatabaseFinisher plus a following SaveToDatabaseFinisher which gets the ‘{SaveToDatabase.insertedUids.0}’ value.
This is the logic of my second SaveToDatabaseFinisher:
// ... protected function saveToDatabase(array $databaseData, string $table, int $iterationCount) { // ... $categories = explode(",", $databaseData["categories"]); $sorting = 0; foreach ($categories as $category) { $categoryData = [ "uid_local" => $databaseData["guide_id"], "uid_foreign" => $category, "sorting" => $sorting ]; parent::saveToDatabase($categoryData, $table, $iterationCount); $sorting++; } } // ...Have a great day!
-
Björn Jacob changed TYPO3 Version
911 Sprint FocusRemote Sprint<span data-processor="relativetime" data-value="2021-08-06T11:26:51+00:00" > 08/06/21, 11:26 </span>
-
Mathias Brodala changed TYPO3 Version
1113 <span data-processor="relativetime" data-value="2026-02-26T13:57:58+00:00" > 02/26/26, 13:57 </span> -
Daniel Janek commented and changed PHP Version
7.28.2 <span data-processor="relativetime" data-value="2026-02-26T15:47:41+00:00" > 02/26/26, 15:47 </span>Problem still exists in v13 (thanks for change TYPO3 Version Mathias Brodalla)
-
Gerrit Code Review pushed patch set 2 for main to change 93782 status
NewUnder Review <span data-processor="relativetime" data-value="2026-04-21T14:56:22+00:00" > 04/21/26, 14:56 </span> -
Gerrit Code Review pushed patch set 3 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-21T15:00:29+00:00" > 04/21/26, 15:00 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-21T15:03:27+00:00" > 04/21/26, 15:03 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-22T05:44:55+00:00" > 04/22/26, 05:44 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-22T07:23:11+00:00" > 04/22/26, 07:23 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-22T11:06:08+00:00" > 04/22/26, 11:06 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-22T12:30:33+00:00" > 04/22/26, 12:30 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-22T14:46:10+00:00" > 04/22/26, 14:46 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 93782 <span data-processor="relativetime" data-value="2026-04-23T18:21:08+00:00" > 04/23/26, 18:21 </span>
-
Gerrit Code Review pushed patch set 11 for main to change 93782 <span data-processor="relativetime" data-value="2026-05-05T15:37:01+00:00" > 05/05/26, 15:37 </span>
-
Josua Vogel commented <span data-processor="relativetime" data-value="2026-05-11T09:41:22+00:00" > 05/11/26, 09:41 </span>
Hi @software ,
Could you test or check my latest patch? -
Gerrit Code Review pushed patch set 12 for main to change 93782 <span data-processor="relativetime" data-value="2026-05-22T07:55:41+00:00" > 05/22/26, 07:55 </span>
-
Gerrit Code Review pushed patch set 13 for main to change 93782 <span data-processor="relativetime" data-value="2026-07-24T14:46:23+00:00" > 07/24/26, 14:46 </span>
-
Gerrit Code Review pushed patch set 14 for main to change 93782 <span data-processor="relativetime" data-value="2026-07-26T12:55:19+00:00" > 07/26/26, 12:55 </span>
-
Gerrit Code Review pushed patch set 15 for main to change 93782 <span data-processor="relativetime" data-value="2026-07-26T13:16:28+00:00" > 07/26/26, 13:16 </span>
-
Gerrit Code Review pushed patch set 16 for main to change 93782 <span data-processor="relativetime" data-value="2026-07-30T13:34:45+00:00" > 07/30/26, 13:34 </span>
-
Gerrit Code Review pushed patch set 17 for main to change 93782 <span data-processor="relativetime" data-value="2026-07-30T14:02:18+00:00" > 07/30/26, 14:02 </span>
-
Gerrit Code Review pushed patch set 18 for main to change 93782 <span data-processor="relativetime" data-value="2026-07-30T14:17:10+00:00" > 07/30/26, 14:17 </span>
-
Gerrit Code Review pushed patch set 19 for main to change 93782 <span data-processor="relativetime" data-value="2026-09-02T22:06:28+00:00" > 09/02/26, 22:06 </span>
-
Gerrit Code Review pushed patch set 20 for main to change 93782 <span data-processor="relativetime" data-value="2026-09-14T08:20:32+00:00" > 09/14/26, 08:20 </span>
-
Gerrit Code Review pushed patch set 21 for main to change 93782 <span data-processor="relativetime" data-value="2026-09-14T09:32:13+00:00" > 09/14/26, 09:32 </span>
-
Gerrit Code Review pushed patch set 22 for main to change 93782 <span data-processor="relativetime" data-value="2026-09-14T10:11:35+00:00" > 09/14/26, 10:11 </span>
-
Gerrit Code Review pushed patch set 23 for main to change 93782 <span data-processor="relativetime" data-value="2026-10-07T14:37:19+00:00" > 10/07/26, 14:37 </span>
The SaveToDatabase finisher was originally meant to provide a starting point for custom implementations and is therefor currently not capable of rendering all possible fields and combinations. In stable releases it should be used for very simple forms or as code tutorial on how to develop own finishers.
For future versions we need to define a concept of how and what we want to ship with the core.