tcaDescription

Use this fieldInformation to allow adding a more detailed description to the form element. tcaDescription will read the description part of the TCA column definition. If that value starts with LLL: it will render a translated output. Else it will render the text unmodified.

Shows a red rect where the tcaDescription as part of fieldInformation is rendered

tcaDescription

tcaDescription
Type
array
Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldInformation']
Scope
fieldInformation

tcaDescription is activated for most of the TYPO3 form elements by default.

Examples

Activate tcaDescription

For most of the TYPO3 own form elements it is not needed to activate tcaDescription as it is activated by default. Before adding tcaDescription to any kind of form elements you have to make sure the element supports the rendering of fieldInformation.

EXT:my_extkey/Configuration/TCA/Overrides/pages.php
<?php

$GLOBALS['TCA']['pages']['columns']['my_own_column'] = [
    'label' => 'My own column',
    'description' => 'LLL:EXT:my_extkey/Resources/Private/Language/locallang_tca.xlf:pages.my_own_column.description',
    'config' => [
        'type' => 'input',
        'renderType' => 'mySpecialRenderingForInputElements',
        'default' => '',
        'fieldInformation' => [
            'tcaDescription' => [
                'renderType' => 'tcaDescription',
            ],
        ],
    ],
];
Copied!

Render a description

As tcaDescription is activated for most of the TYPO3 own form elements, it just needs to set the description property:

EXT:seo/Configuration/TCA/Overrides/pages.php
<?php

$GLOBALS['TCA']['pages']['columns']['canonical_link'] = [
    'exclude' => true,
    'label' => 'LLL:EXT:seo/Resources/Private/Language/locallang_tca.xlf:pages.canonical_link',
    'description' => 'LLL:EXT:seo/Resources/Private/Language/locallang_tca.xlf:pages.canonical_link.description',
    'displayCond' => 'FIELD:no_index:=:0',
    'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
        'size' => 50,
        'appearance' => [
            'browserTitle' => 'LLL:EXT:seo/Resources/Private/Language/locallang_tca.xlf:pages.canonical_link',
            'allowedOptions' => ['params', 'rel'],
        ],
    ],
];
Copied!