Feature #15184
closedTCA Columns ReadOnly
0%
Description
It would be nice to have an Read-Only Field-Type in the TCA only to display Data from the database. The Options from the input-type concerning the formating of the Data (datetime, etc.) should be availiable
(issue imported from #M1801)
Updated by Thomas Hempel about 19 years ago
Maybe it would be much easier to add an option "read-only" to the TCA (which displays every field as simple text) than adding a complete new fieldtype!?
At least this would be much more flexible...
I will have a look on this and try to provide a patch the next days if noone provides such a patch earlier. ;-)
Greets,
Thomas
Updated by Martin Kutschker almost 19 years ago
The type you want is already there. It's called "none".
see: TYPO3 Core APIs / ['columns'][fieldname]['config'] / TYPE: "none"
The type lacks currently any formatting options.
Updated by Martin Kutschker almost 19 years ago
Is type "none" enought for you? Can we close this bug?
Anyway you can even render a field yourself (type "user").
Updated by Ingo Schmitt almost 19 years ago
"none" is not ok, as the formating is missing. I was thinking of an read only html form field
Updated by Martin Kutschker almost 19 years ago
Ischmittis, did you bother to read the documentation of type "none"?
http://typo3.org/documentation/document-library/doc_core_api/columns_fieldnam-7/
(see "TYPO3 Core APIs")
Updated by Ingo Schmitt almost 19 years ago
Yep: Type "none" is lacking of formating (e.g. Timestamps, double)..
Updated by Martin Kutschker almost 19 years ago
You said you wanted an "html form field", which I interpreted as INPUT (type="text) or TEXTAREA.
But you are right formatting is missing. I have posted on the dev-list ("RFE: formatting for TCA-type "none") but got no response :-(
What I proposed was a new config property "format". The value of it is a format keyword followed by a format option.
Examples for possible formats:
date,<date() opts>
time,<strftime() opts>
number,<sprintf() opts>
user,<userfunc>,<opts>
Updated by Martin Kutschker almost 19 years ago
For compatibilty with the "eval" config:
date: without format defaults to d-m-Y
time: without format defaults to mm:hh
datetime: no format, always mm:hh d-m-Y
timesec: no format, always mm:hh:ss
md5: no format, md5-hash of contents
The md5 format can be used to check wether the contents is the same without compromising the content itself.
Updated by Martin Kutschker almost 19 years ago
In CVS there are now new rendering options.
Updated by Martin Kutschker almost 19 years ago
Please grab a fresh copy from CVS (or use Bernhard Kraft's nighlies) and have a look at class.t3lib_tceforms.php to see if the new render options solve your problem.
Updated by Martin Kutschker over 18 years ago
Hi!
Didi you try the new options of type="none"? They were included in beta3.
Masi
Updated by Ingo Schmitt over 18 years ago
Testing beta3 with commerce needs much time, since there are realy some new bugs. I'll test next week, also Patch from Rene with readonly
Updated by Ingo Schmitt over 18 years ago
Solution is fine with me, everything is working as expected
Updated by Martin Kutschker over 18 years ago
I'm closing the bug. If there are requests for further enhancements or issues with the existing ones new bugs should be filed.