Attention
TYPO3 v6 has reached its end-of-life April 18th, 2017 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is strongly recommended updating your project.
Common column properties¶
There are a number of properties which are common to all field types. They are described below.
Properties¶
Property details¶
type¶
Key
type
Datatype
string
Description
This defines the type of the field. It has to be one of the values described in the following chapters.
Scope
Display
/ Proc.
form_type¶
Key
form_type
Datatype
string
Description
This will override the field type when displaying it as a form. It can take any of the values available for "type" above.
Scope
Display
dbType¶
Key
dbType
Datatype
string
Description
This defines a specific database field type for the given field.
This is currently only supported for "date" or "datetime" fields
(i.e. input-type fields with the "eval" property set to "date" or "datetime")
and the dbType
can be set only to "date" or "datetime".
Scope
Database
default¶
Key
default
Datatype
Description
This property can be used to set a default value for the field. Its data type is whatever is appropriate for the given field.
Since TYPO3 CMS 6.2, NULL
is a valid default value.
Scope
Display
/ Proc.
softref¶
Key
softref
Datatype
string
Description
Used to attach "soft reference parsers". See under "Additional TCA features" for information about softref keys. The syntax for this value is key1,key2[parameter1;parameter2;...],...
Scope
Proc.
readOnly¶
Key
readOnly
Datatype
boolean
Description
Renders the form in a way that the user can see the values but cannot edit them. The rendering is as similar as possible to the normal rendering but may differ in layout and size.
Note
Read-only is not implemented automatically for user-defined form items. It is up to each developer to implement read-only rendering for its own types.
Warning
This property affects only the display. It is still possible to write to those fields when using the TYPO3 Core Engine.
Scope
Display
search¶
Key
search
Datatype
array
Description
Defines additional search-related options for a given field.
pidonly (boolean) : searches in the column only if search happens on the single page (does not search the field if searching in the whole table)
case (boolean) : makes the search case-sensitive. This requires a proper database collation for the field (see your database documentation)
andWhere (string) : additional SQL WHERE statement without 'AND'. With this it is possible to place an additional condition on the field when it is searched (see example below).
Example:
The "tt_content" table has the following definition:
$TCA['tt_content'] = array(
// ...
'columns' => array(
// ...
'bodytext' => array(
// ...
'config' => array(
//...
'search' => array(
'andWhere' => 'CType=\'text\' OR CType=\'textpic\'',
),
// ...
),
),
// ...
),
// ...
);
This means that the "bodytext" field of the "tt_content" table will be searched in only for elements of type Text and Text & Images. This helps make any search more relevant.
Scope
Search