form.data ViewHelper <flux:form.data>

Converts raw flexform xml into an associative array, and applies any transformation that may be configured for fields/objects.

Example: Fetch page configuration inside content element

Since the page variable is available in fluidcontent elements, we can use it to access page configuration data:

<flux:form.data table="pages" field="tx_fed_page_flexform" record="{page}" />

Example: Check if page is accessible before loading data

Data of disabled and deleted pages cannot be loaded with flux:form.data and lead to an TYPO3FluidFluidCoreViewHelperException. To prevent this exception, check if the page is accessible by generating a link to it:

<f:if condition="{f:uri.page(pageUid: myUid)}">
<flux:form.data table="pages" field="tx_fed_page_flexform" uid="{myUid}" as="pageSettings">
...

</flux:form.data>

</f:if>

Arguments

table

DataType
string
Required
true
Description
Name of table that contains record with Flux field

field

DataType
string
Required
true
Description
Name of Flux field in table

uid

DataType
integer
Required
false
Description
UID of record to load (used if "record" attribute not used)

record

DataType
mixed
Required
false
Description
Record containing Flux field (used if "uid" attribute not used)

as

DataType
string
Required
false
Description
Optional name of variable to assign in tag content rendering