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.
mode
mode
-
- Path
-
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- type
-
string (keywords)
- Scope
-
Display
- Types
Possible keywords:
use
Or Override Placeholder This property is related to the
placeholder
property. When defined, a checkbox will appear above the field. If that box is checked, the field can be used to enter whatever the user wants as usual. If the box is not checked, the field becomes read-only and the value saved to the database will beNULL
.For example, this is used for the
sys_
TCA configuration used for file references, so that fields likefile_ metadata title
will fall back to the default title of a file instead of using an empty value defined for the reference.Warning
In order for this property to apply properly, the DB column must be allowed to be
NULL
, and propertynullable
must be set totrue
.
Examples
An input field with placeholder that can be overridden
[
'columns' => [
'input_28' => [
'exclude' => 1,
'label' => 'input_28',
'description' => 'placeholder=__row|input_26 mode=useOrOverridePlaceholder eval=null default=null',
'config' => [
'type' => 'input',
'placeholder' => '__row|input_26',
'eval' => 'null',
'default' => null,
'mode' => 'useOrOverridePlaceholder',
],
],
],
]
A text field with placeholder that can be overridden
[
'columns' => [
'text_14' => [
'exclude' => 1,
'label' => 'text_14',
'description' => 'placeholder=__row|text_12, mode=useOrOverridePlaceholder, eval=null',
'config' => [
'type' => 'text',
'placeholder' => '__row|text_12',
'eval' => 'null',
'mode' => 'useOrOverridePlaceholder',
],
],
],
]