Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
fieldInformation
fieldInformation
-
- Path
-
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- type
-
array
- Scope
-
Display
- Types
Show information between an element label and the main element input area. Configuration works identical to the "fieldWizard" property, no default configuration in the core exists (yet). In contrast to "fieldWizard", HTML returned by fieldInformation is limited, see FormEngine docs for more details.
Hint
field
is not implemented by default. Use Description
to display general information below a fields title.
Example
You can have a look at the extension georgringer/
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/
this was moved to a non-public extension).
'tags' => [
'config' => [
// ...
'fieldInformation' => [
'tagInformation' => [
'renderType' => 'NewsStaticText',
'options' => [
'labels' => [
[
'label' => '',
'bold' => true,
'italic' => true,
],
],
],
],
],
]
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' => '...>',
];
}
}
The custom FieldInformation must be rendered in ext_
:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1552726986] = [
'nodeName' => 'NewsStaticText',
'priority' => 70,
'class' => \GeorgRinger\News\Backend\FieldInformation\StaticText::class
];