Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Add note on accessing defaults in FlexForm attributs #3612

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Documentation/ApiOverview/FlexForms/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------------------------------

Expand Down