Feature #33235

Placeholder for TCEForm fields text/input

Added by Tobias Liebig about 8 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Target version:
-
Start date:
2012-01-16
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

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.

Allowed syntax:

  • "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.

http://etobi.de/screens/placholder-20120116-213633.png

This feature was part of the BLE project.

placholder.png View (9.81 KB) Tobias Liebig, 2012-01-16 21:38


Related issues

Related to TYPO3 Core - Bug #52630: PlaceHolder Feature in TCEforms only works on first relation level Closed 2013-11-13 2013-11-13

Associated revisions

Revision 91da9e85 (diff)
Added by Tobias Liebig about 8 years ago

[FEATURE] Placeholder for TCEForm fields

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 is configurable by TCA config. Uses the HTML5 placeholder attribute.

Change-Id: Icdb4f774be6d04ebbdf14dcf1653c0950a6d0ed6
Resolves: #33235
Reviewed-on: http://review.typo3.org/7823
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Ingmar Schlecht
Tested-by: Ingmar Schlecht

History

#1 Updated by Tobias Liebig about 8 years ago

  • Status changed from New to Accepted

#2 Updated by Gerrit Code Review about 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7823

#3 Updated by Georg Ringer about 8 years ago

as we are using html5 in backend, why not use the placeholder attribute anyway?

#4 Updated by Tobias Liebig about 8 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.

#5 Updated by Georg Ringer about 8 years ago

it works also in current firefox and normal safari 5.0.5

IMO it is absolutly fine to use this and not the additional JS + overhead

#6 Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7823

#7 Updated by Gerrit Code Review about 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7823

#8 Updated by Gerrit Code Review about 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7823

#9 Updated by Tobias Liebig about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100

#10 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF