Project

General

Profile

Actions

Feature #85865

closed

TCA default value should accept LLL:EXT syntax

Added by Torben Hansen over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2018-08-15
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

It should be possible to control the default value of a TCA field using the LLL:EXT syntax like shown below

'config' => [
    'type' => 'input',
    'size' => 4,
    'readOnly' => true,
    'default' => 'EXT:LLL:myext/Resources/Private/Language/locallang_db.xlf:field_default',
]

Use case for this scenario is for example a readonly input field, where the value is assigned using a datahandler hook, but you want to show the editor, that the value will be set automatically. In order to keep the backend fully translated, it should be possible to set a localized value as default.

Edge case of course, but should be easy to implement in

TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowDefaultValues

Actions

Also available in: Atom PDF