Core API
4.2.4. ['columns'][fieldname] section
The "columns" section contains configuration for each table field (also called "column") which can be edited by the backend.
The configuration includes both properties for the display in the backend as well as the processing of the submitted data.
Each field can be configured as a certain "type" (eg. checkbox, selector, iinput field, text area, file or db-relation field, user defined etc.) and for each type a separate set of additional properties applies. These properties are clearly explained below for each type.
This table showns the keys of the ['columns'][fieldname] array:
|
Key |
Datatype |
Description |
Scope |
|---|---|---|---|
|
label |
string (LS) |
Required! The name of the field as it is shown in the interface:
|
Display |
|
exclude |
boolean |
If set, all backend users are prevented from editing the field unless they are members of a backend usergroup with this field added as an "Allowed Excludfield" (or "admin" user). |
Proc. |
|
l10n_mode |
string (keyword) |
Localization mode. Only active if the ctrl-directive "languageField" is set.
The main relevance is when a record is localized by an API call in tcemain that makes a copy of the default language record. You can think of this process as copying all fields from the source record, except if a special mode applies as defined below:
Keywords are:
(Doesn't apply to flexform fields.) |
Display / Proc. |
|
l10n_display |
list of keywords |
Localization display. see: l10n_mode
This option can be used to define the language related field rendering. This has nothing to do with the processing of language overlays and data storage but the display of form fields.
Keywords are:
|
Display |
|
l10n_cat |
string (keyword) |
Localization category.
Keywords: text,media
When localization mode is set for a TCEforms, it must be either of these values. Only the fields that have l10n_cat set to the localization mode is show. Used to limit display so only most relevant fields are shown to translators. It doesn't prevent editing of other fields if records are edited outside localization mode, it merely works as a display condition.
It is also used in localization export (pending at this moment). |
Display |
|
config |
array |
Contains the actual configuration properties of the fields display and processing behaviour. The possibilities for this array depend on the value of the array key "type" within the array. Each valid value for "type" is shown below in a separate table.
Notice: For all configuration types, the
|
- |
|
displayCond |
string |
Contains a condition rule for whether to display the field or not.
A rule is a string divided into several parts by ":" (colons). The first part is the rule-type and the subsequent parts will depend on the rule type. Currently these rule values can be used:
For FlexForm elements the fields are tags on same level. If <langChildren> is enabled, then the value of other fields on same level is taken from the same language.
Example: This example will require the field named "tx_templavoila_ds" to be true, otherwise the field for which this rule is set will not be displayed:
'displayCond' => 'FIELD:tx_templavoila_ds:REQ:true',
This example requires the extension "static_info_tables" to be loaded, otherwise the field is not displayed. (This is useful if the field makes a look-up on a table coming from another extension!)
'displayCond' => 'EXT:static_info_tables:LOADED:true',
|
Display |
|
defaultExtras |
string |
In the "types" configuration of a field you can specify on position 4 a string of "extra configuration". This string will be the default string of extra options for a field regardless of types configuration. For instance this can be used to create an RTE field without having to worry about special configuration in "types" config. This is also the way by which you can enable the RTE for FlexForm fields.
Example value:
richtext[cut|copy|paste|formatblock|textcolor|bold|italic|underline|left|center|right|orderedlist|unorderedlist|outdent|indent|link|table|image|line|chMode]:rte_transform[mode=ts_css|imgpath=uploads/tx_mininews/rte/] |
|
