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.
placeholder
placeholder
-
- Path
-
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- type
-
string
- Scope
-
Display
- Types
Placeholder text for the field. This can be a simple string or a reference to a value in the current record or another one. With a syntax like
__
the placeholder will take the value of the given field from the current record.row |field This can be recursive to follow a longer path in a table record chain. If the designated field is a relation to another table (is of type select, group or inline), the related record will be loaded and the placeholder searched within it.
Example from the "sys_file_reference" table:
'title' => [ 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title', 'config' => [ 'type' => 'input', 'size' => 20, 'eval' => 'null', 'placeholder' => '__row|uid_local|metadata|title', 'mode' => 'useOrOverridePlaceholder' ] ],
Copied!In the above placeholder syntax,
uid_
points to the related "sys_file" record andlocal metadata
points to the "sys_file_metadata" of the related "sys_file" record. From there we take the content of thetitle
field as placeholder value.