Placeholder for TCEForm fields text/input
We need the possibility to display a placeholder/ghosttext in TCEForm fields to guide the user about default values. The Placeholder will disappear as soon as the user enters a value.
The Placeholder should be configurable by TCA config.
"Foobar"=> will display "Foobar" as placeholder
"LLL:EXT:foobar/Resources/Private/Languages/locallang.xml"=> support "LLL:" syntax
"__row|fieldName"=> will display the value of /fieldName/ as placeholder
"__row|relationField|fieldName"=> If "relationField" is configured as group/db, display the value of "fieldName" of the foreign record as placeholder.
This feature was part of the BLE project.
Updated by Tobias Liebig almost 10 years ago
Georg Ringer wrote:
as we are using html5 in backend, why not use the placeholder attribute anyway?
Currently the placeholder-attribute is only supported by the latest Webkit (Safari Nightly) and Chrome. This is why i implemented the JS-part to emulate the behavior.
BTW: Thanks for your review. I'll take care about your comments soon.