DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Flexform¶

A major point of criticism on TemplaVoilà was that the actual content was stored in XML structures (belonging to the flexform that defines the form). It was almost impossible to use this in queries and it was not clean enough for many.

For data which doesn't need to be queries there is not much against a flexform. There are loads of possibilities to create forms and one of them is using repeated sections.

The structure of a flexform is documented and most of the possibilities can be found in the TCA documentation. The flexform for the slider is stored in Configuration/FlexForms/flexform_slider.xml .

The content from a flexform is stored in the field 'pi_flexform' in the tt_content table. It needs to be added to the configuration for this field:

$GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds'][',slider'] =
        'FILE:EXT:sitepackage/Configuration/FlexForms/flexform_slider.xml';

After the ['ds'] is a comma separated value. The first part is the list_type for which the flexform should be used and the second part the CType. If one of the parts is empty or a '*' then it matches any value. In this case we only care about the CType which should be 'slider'.