#103532Using TSconfig TCEFORM to change existing flexform field configuration does not work
Description
You can use TSconfig TCEFORM to change attributes of flexform fields via:
TCEFORM.tx_styleguide_flex.flex_file_1.default.sDEF.input_1.label = Override Label
However, you can not change the “config” section of a field, for example to add a enableRichtext attribute, or change the rows/cols of an input. This is currently only possible to change for main-level fields like “tt_content.header”, but not for flexform fields:
TCEFORM.tx_styleguide_flex.flex_file_1.default.sDEF.input_1.config.max = 30
TCEFORM.tx_styleguide_flex.flex_file_1.default.sDEF.input_1.config.size = 5
You can already use PSR-14 events (AfterFlexFormDataStructureParsedEvent) to modify a flexform, but this is a bit more complicated than just using TSconfig. So I’d argue that setting it via TSconfig should be possible.
Reviews 2
Related issues 3
History 517
-
Garvin Hicking changed Related to #102595 <span data-processor="relativetime" data-value="2024-04-04T11:12:48+00:00" > 04/04/24, 11:12 </span>
-
Garvin Hicking changed Related to #36609 <span data-processor="relativetime" data-value="2024-04-04T11:13:59+00:00" > 04/04/24, 11:13 </span>
-
Garvin Hicking changed Related to #91690 <span data-processor="relativetime" data-value="2024-04-04T11:14:28+00:00" > 04/04/24, 11:14 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 83646 status
NewUnder Review <span data-processor="relativetime" data-value="2024-04-04T11:23:19+00:00" > 04/04/24, 11:23 </span> -
Gerrit Code Review pushed patch set 2 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-04T11:31:35+00:00" > 04/04/24, 11:31 </span>
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-04-04T12:20:01+00:00" > 04/04/24, 12:20 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-04T12:22:06+00:00" > 04/04/24, 12:22 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-04T12:46:25+00:00" > 04/04/24, 12:46 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-04T16:55:41+00:00" > 04/04/24, 16:55 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-04T16:56:40+00:00" > 04/04/24, 16:56 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-05T07:27:49+00:00" > 04/05/24, 07:27 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-05T07:28:49+00:00" > 04/05/24, 07:28 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 83646 <span data-processor="relativetime" data-value="2024-04-05T08:21:44+00:00" > 04/05/24, 08:21 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 83646 <span data-processor="relativetime" data-value="2024-09-18T09:19:25+00:00" > 09/18/24, 09:19 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 83728 <span data-processor="relativetime" data-value="2025-01-21T13:03:19+00:00" > 01/21/25, 13:03 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 83728 <span data-processor="relativetime" data-value="2025-01-21T14:15:27+00:00" > 01/21/25, 14:15 </span>
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2025-10-16T10:34:29+00:00" > 10/16/25, 10:34 </span>
I’m pretty sure i already used that feature a couple of years ago. Kai Vogel contributed a lot to the flexform stuff back then, but flexforms and TCA had a lot of changes in the meantime. Would be great to get that back
https://git.typo3.org/typo3/typo3/-/commit/7e66b70b07338dbfb049ac6d124012bc4c91c99e
For reference, here’s how you could already achieve this with the AfterFlexFormDataStructureParsedEvent:
In a custom extension (i.e. sitepackage, with a vendor like “MyVendor”) do this:
1. Add to
sitepackage/Configuration/Services.yaml:2. Create
sitepackage/Classes/Backend/FlexFormParsingModifyEventListener.php:3. Reset your cache, go to the backend, and it should now populate input_1 with the extra attributes.
Note that this PSR-14 event is much more flexibel because the Matrix is not enforced here, and thus you can perform any change you see fit (also changing input types). However, the TCEFORM TSconfig way is less hassle to implement.