From 6495dd807b47800beb3c3b6f810d8a5dd1cead4b Mon Sep 17 00:00:00 2001 From: Garvin Hicking <blog@garv.in> Date: Thu, 26 Oct 2023 11:33:12 +0200 Subject: [PATCH 1/3] [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 00599d42be..fa39b3a82b 100644 --- a/Documentation/ApiOverview/FlexForms/Index.rst +++ b/Documentation/ApiOverview/FlexForms/Index.rst @@ -478,6 +478,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:`<default>` XML attribute within the specification of each +FlexForm attribute. If that is missing, an empty value will be +shown in the backend (:ref:`FormEngine <FormEngine>`) +fields. + +While you can use TypoScript :typoscript:`TCAdefaults` (see +:ref:`TCAdefaults <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 ---------------------------------- From 9c58e02acad8d3498e676706be4b1427b4d6ec3d Mon Sep 17 00:00:00 2001 From: Garvin Hicking <blog@garv.in> Date: Thu, 26 Oct 2023 12:16:53 +0200 Subject: [PATCH 2/3] [DOCS] Add proper link, head section, wording --- Documentation/ApiOverview/FlexForms/Index.rst | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Documentation/ApiOverview/FlexForms/Index.rst b/Documentation/ApiOverview/FlexForms/Index.rst index fa39b3a82b..c7d365daa9 100644 --- a/Documentation/ApiOverview/FlexForms/Index.rst +++ b/Documentation/ApiOverview/FlexForms/Index.rst @@ -475,11 +475,11 @@ The key `flexform` is followed by the field which holds the FlexForm data * :ref:`TypoScript: flexform <t3tsref:data-type-gettext-flexform>` -.. index:: pair: FlexForms; Fluid -.. _read-flexforms-fluid: +.. index:: pair: FlexForms; Typoscript +.. _default-flexforms-attribute: 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 @@ -488,12 +488,14 @@ FlexForm attribute. If that is missing, an empty value will be shown in the backend (:ref:`FormEngine <FormEngine>`) fields. -While you can use TypoScript :typoscript:`TCAdefaults` (see -:ref:`TCAdefaults <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. +While you can use TypoScript :ref:`t3tsref:pageTsTcaDefaults` 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. + +.. index:: pair: FlexForms; Fluid +.. _read-flexforms-fluid: How to access FlexForms from Fluid ---------------------------------- From 4a3058113e37d98b2423d54ff265054eb12e6105 Mon Sep 17 00:00:00 2001 From: Garvin Hicking <blog@garv.in> Date: Thu, 26 Oct 2023 13:13:55 +0200 Subject: [PATCH 3/3] [DOCS] Proper pairing, TypoScript -> TSconfig --- Documentation/ApiOverview/FlexForms/Index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/ApiOverview/FlexForms/Index.rst b/Documentation/ApiOverview/FlexForms/Index.rst index c7d365daa9..f7187f5007 100644 --- a/Documentation/ApiOverview/FlexForms/Index.rst +++ b/Documentation/ApiOverview/FlexForms/Index.rst @@ -475,7 +475,7 @@ The key `flexform` is followed by the field which holds the FlexForm data * :ref:`TypoScript: flexform <t3tsref:data-type-gettext-flexform>` -.. index:: pair: FlexForms; Typoscript +.. index:: pair: FlexForms; Default value .. _default-flexforms-attribute: Providing default values for FlexForms attributes @@ -488,7 +488,7 @@ FlexForm attribute. If that is missing, an empty value will be shown in the backend (:ref:`FormEngine <FormEngine>`) fields. -While you can use TypoScript :ref:`t3tsref:pageTsTcaDefaults` to +While you can use page TSconfig's :ref:`t3tsref:pageTsTcaDefaults` 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