nullable¶
Changed in version 12.0: This option was introduced to replace the TCA eval
option with
null
as value.
- nullable (type => email)¶
- Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
- Type
boolean
- Default
false
- Scope
Proc
If set to true, a checkbox will appear, which by default deactivates the field. In the deactivated state the field is saved as
NULL
in the database. By activating the checkbox it is possible to set a value, which won't be saved asNULL
, even an empty string.When the eval option is set to
unique
oruniqueInPid
multiplenull
values are still possible.The database field should have the according
NULL
option set.
Example:
EXT:some_extension/Configuration/TCA/tx_sometable.php¶
'columns' => [
'nullable_column' => [
'title' => 'A nullable field',
'config' => [
'type' => 'email',
'nullable' => true,
'eval' => 'uniqueInPid',
],
],
],