Issue Bug New Quiet

#94158Select type selectSingle fields (and likely other renderTypes too) do not support eval=null

Claus Due 05/19/21, 12:34 updated 10/18/26, 16:32

Description

Example TCA:

'field' => [
    'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xlf:table.field',
    'config' => [
        'type' => 'select',
        'renderType' => 'selectSingle',
        'foreign_table' => 'tx_foo',
        'eval' => 'null',
    ],
],

Expectation:

Field should render with the “Set value” checkbox identical to how eval=null works on for example simple input fields.

Current behavior:

Option eval=null is ignored and does not render a “Set value” checkbox above the field.

References:

Similarly reported for RTE fields on https://forge.typo3.org/issues/88480

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[BUGFIX] Select type selectSingle fields (and likely other renderTypes too) do not support eval=null Resolves: #94158 Releases: main

History 3

  1. Benni Mack commented <span data-processor="relativetime" data-value="2026-10-18T16:32:21+00:00" > 10/18/26, 16:32 </span>

    Since #105441 (14.2), the documented way to make a select nullable is a null item plus a null default:

    'default' => null,
    'items' => [['label' => 'Please choose', 'value' => null]],

    However, I think it is still valid that select cannot deal with null yet.