fieldInformation

The fieldInformation is a reserved area within a single form element between the label and the form element itself.

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

fieldInformation

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

Currently, TYPO3 comes with following implemented fieldInformation nodes:

Example

You can have a look at the extension georgringer/news in version 9.4 for an example: https://github.com/georgringer/news/blob/9.4.0/Configuration/TCA/tx_news_domain_model_news.php#L521 (with georgringer/news ^10.0 this was moved to a non-public extension).

EXT:news/Configuration/TCA/tx_news_domain_model_news.php (Excerpt)
'tags' => [
    'config' => [
        // ...
        'fieldInformation' => [
            'tagInformation' => [
                'renderType' => 'NewsStaticText',
                'options' => [
                    'labels' => [
                        [
                            'label' => '',
                            'bold' => true,
                            'italic' => true,
                        ],
                    ],
                ],
            ],
        ],
    ]
Copied!

The implementation can be found in https://github.com/georgringer/news/blob/9.4.0/Classes/Backend/FieldInformation/StaticText.php:

<?php

declare(strict_types=1);

namespace GeorgRinger\News\Backend\FieldInformation;

use TYPO3\CMS\Backend\Form\AbstractNode;

class StaticText extends AbstractNode
{
    public function render(): array
    {
        // ...

        return [
            'requireJsModules' => [
                'TYPO3/CMS/News/TagSuggestWizard',
            ],
            'html' => '...>',
        ];
    }
}
Copied!

The custom FieldInformation must be rendered in ext_localconf.php:

EXT:news/ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1552726986] = [
    'nodeName' => 'NewsStaticText',
    'priority' => 70,
    'class' => \GeorgRinger\News\Backend\FieldInformation\StaticText::class
];
Copied!