flex-form
data processor
New in version 12.1
One can use the alias flex-
instead
of the fully-qualified class name
\TYPO3\
.
TYPO3 offers FlexForms which can be used to store
data within an XML structure inside a single database column. The data processor
\TYPO3\
,
alias flex-
, converts the
FlexForm data of a given field into a Fluid-readable array.
Table of contents
Options
fieldname
-
- Type
- string
- Required
- false
- Default
- 'pi_flexform'
Field name of the column the FlexForm data is stored in.
as
-
- Type
- string
- Required
- false
- Default
- 'flexFormData'
Name for the variable in the Fluid template.
Examples
Example of a minimal TypoScript configuration
# Before TYPO3 v12.1 you have to specify the fully-qualified class name of the processor
# dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor
# Since TYPO3 v12.1 one can also use the available alias
10 = flex-form
The converted array can be accessed within the Fluid template with the
{flex
variable.
Example of an advanced TypoScript configuration
# Before TYPO3 v12.1 you have to specify the fully-qualified class name of the processor
# dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor
# Since TYPO3 v12.1 one can also use the available alias
10 = flex-form
10 {
fieldName = my_flexform_field
as = myOutputVariable
}
The converted array can be accessed within the Fluid template with the
{my
variable.
Example with a custom sub-processor
# Before TYPO3 v12.1 you have to specify the fully-qualified class name of the processor
# dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor
# Since TYPO3 v12.1 one can also use the available alias
10 = flex-form
10 {
fieldName = my_flexform_field
as = myOutputVariable
dataProcessing {
10 = Vendor\MyExtension\DataProcessing\CustomFlexFormProcessor
}
}