Bug #91966
closedreadOnly rendering of input is missing placeholder
100%
Description
If you set a field in TCA to readOnly, it is still rendered in the backend (which is great to see the value). If the field is a relation to sys_file_reference it's also possible to toggle the Inline view and see the sys_file_reference data (like alternative and description). Those fields do not show their placeholder (which would come from sys_file_metadata instead of sys_file_reference, if the field is empty).
It would be nice, if the readOnly preview would show the value of the placeholder.
It's only needed to add the placeholder to the disabled field:
InputTextElement.php:L97
'placeholder' => $config['placeholder'] ?? '',
The check for the placeholder is currently done later (after the function already returned because of readOnly):
InputTextElement.php:L297
Relevant TCA:
$TCA['tx_example_project']['columns']['image'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(...); // default image TCA
$TCA['tx_example_project']['columns']['image']['config']['readOnly'] = true;
I am not sure, if this is considered a bug or a feature. I am also not sure, if the category is correct. It's possible that FormEngine is better.