# Elements¶

This is the list of elements and their nesting in the Data Structure.

## Elements Nesting Other Elements (“Array” Elements)¶

All elements defined here cannot contain any string value but must contain another set of elements.

(In a PHP array this corresponds to saying that all these elements must be arrays.)

Element Description Child elements
<T3DataStructure> Document tag

<meta>

<ROOT> or <sheets>

<meta> Can contain application specific meta settings (depends on application)

<ROOT>

<[field name]>

Defines an “object” in the Data Structure

• <ROOT> is reserved as tag for the first element in the Data Structure.The <ROOT> element must have a <type> tag with the value “array” and then define other objects nested in <el> tags.
• [field name] defines the objects name

<type>

<section>

<el>

<[application tag]>

<sheets> Defines a collection of “sheets” which is like a one-dimensional list of independent Data Structures <[sheet name]>
<TCEforms> Contains details about visual representation of sheets. If there is only a single sheet, applies to implicit single sheet.

<sheetTitle>

<displayCond>

<sheetTitle> Title of the sheet. Mandatory for any sheet except the first (which gets “General” in this case). Can be a plain string or a reference to language file using standard LLL syntax. Ignored if sheets are not defined for the flexform.
<displayCond>

Condition that must be met in order for the sheet to be displayed. If the condition is not met, the sheet is hidden.

For more details refer to the description of the “displayCond” property in the TCA Reference.

<[sheet ident]>

Defines an independent data structure starting with a <ROOT> tag.

Note

Alternatively it can be a plain value referring to another XML file which contains the <ROOT> structure. See example later.

<ROOT>
<el> Contains a collection of Data Structure “objects” <[field name]>

## Elements Containing Values (“Value” Elements)¶

All elements defined here must contain a string value and no other XML tags whatsoever!

(In a PHP array this corresponds to saying that all these elements must be strings or integers.)

Element Format Description
<type>

Keyword string:

“array”, [blank] (=default)

Defines the type of object.

• “array” means that the object simply contains a collection of other objects defined inside the <el> tag on the same level. If the value is “array” you can use the boolean “<section>”. See below.
• Default value means that the object does not contain sub objects. The meaning of such an object is determined by the application using the data structure. For FlexForms this object would draw a form element.

Note

If the object was <ROOT> this tag must have the value “array”

<section> Boolean Defines for an object of the type <array> that it must contain other “array” type objects in each item of <el>. The meaning of this is application specific. For FlexForms it will allow the user to select between possible arrays of objects to create in the form. For TemplaVoila it will select a “container” element for another set of elements inside. This is quite fuzzy unless you understand the contexts.

## Example¶

Below is the (truncated) structure for the plugin options of system extension “felogin”. It shows an example of relative complex data structure used in a FlexForm. More information about such usage of FlexForms can be found in the relevant section of the TCA reference.

<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
</TCEforms>
<type>array</type>
<el>
<TCEforms>
<config>
<type>check</type>
<items type="array">
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:core/Resources/Private/Language/locallang_core.xml:labels.enabled</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
<TCEforms>
<config>
<default>1</default>
<type>check</type>
<items type="array">
<numIndex index="1" type="array">
<numIndex index="0">LLL:EXT:core/Resources/Private/Language/locallang_core.xml:labels.enabled</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
// ...
</el>
</ROOT>
</sDEF>
<s_redirect>
<ROOT>
<TCEforms>
</TCEforms>
<type>array</type>
<el>
<redirectMode>
<TCEforms>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
</numIndex>
<numIndex index="1" type="array">
</numIndex>
// ...
</items>
<size>8</size>
<minitems>0</minitems>
<maxitems>8</maxitems>
</config>
</TCEforms>
</redirectMode>
</el>
</ROOT>
</s_redirect>
<s_messages>
// ...
</s_messages>
</sheets>
</T3DataStructure>