From 13a08239de6c46458c2c19085b9c2e0e6cb67c2f Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Thu, 26 Oct 2023 11:33:12 +0200 Subject: [PATCH] [DOCS] Add note on accessing defaults in FlexForm attributs Follow-up on https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TSconfig/pull/391 to also document at the "other end" how to access flexform defaults. @TODO: I don't know if I linked to the `TCAdefaults` section properly, I don't really understand how/where to fetch external :ref: lookups. Releases: main, 12.4, 11.5 --- Documentation/ApiOverview/FlexForms/Index.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/ApiOverview/FlexForms/Index.rst b/Documentation/ApiOverview/FlexForms/Index.rst index 535ca6154c..c6423263fc 100644 --- a/Documentation/ApiOverview/FlexForms/Index.rst +++ b/Documentation/ApiOverview/FlexForms/Index.rst @@ -479,6 +479,23 @@ The key `flexform` is followed by the field which holds the FlexForm data .. index:: pair: FlexForms; Fluid .. _read-flexforms-fluid: +Providing default values for FlexForms attributes +------------------------------------------------ + +When a new content element with an attached FlexForm is created, the +default values for each FlexForm attribute is fetched from the +:xml:`` XML attribute within the specification of each +FlexForm attribute. If that is missing, an empty value will be +shown in the backend (:ref:`FormEngine `) +fields. + +While you can use TypoScript :typoscript:`TCAdefaults` (see +:ref:`TCAdefaults `) to modify defaults of usual +TCA-based attributes, this is not possible on FlexForms. This +is because the values are calculated at an earlier step in +the core workflow, where FlexForm values have not yet been +extracted. + How to access FlexForms from Fluid ----------------------------------