Project

General

Profile

Actions

Bug #91966

closed

readOnly rendering of input is missing placeholder

Added by Robert Vock over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-08-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review over 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65286

Actions #2

Updated by Georg Ringer over 4 years ago

  • Tracker changed from Feature to Bug
  • Category deleted (Backend User Interface)
  • TYPO3 Version set to 10
Actions #3

Updated by Christian Kuhn over 4 years ago

Styleguide:
Added inline_2 to inline_fal example to show this scenario in styleguide master & 10.
Note some metadata has to be added to one of the styleguide example images first. The generator should do that automatically though, this will be handled in styleguide with https://github.com/TYPO3/styleguide/issues/158

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65286

Actions #5

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65307

Actions #6

Updated by Georg Ringer over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF