READ ME FIRST
Once FAPI uses HTML5 to render elements, this module can be replaced by the "placeholder" attribute available as part of the HTML5 spec. You can update the FAPI to use the "placeholder" attribute right now by using elements module. This means that this module is only useful if you are concerned about older browsers that do not support "placeholder".
*If you are upgrading from 7.x-1.0-rc1 you will need to upgrade the placeholder library. See the README.txt file for details.
General Information
This project adds an extra FAPI attribute called '#placeholder' to textfield field elements. Often textfields should have some text in them like "Enter your text here" until the user clicks on (or tabs to) the element in question. At that point, the text should disappear and the user can enter his or her desired input.
Take a look at the "Search Drupal.org" text in the search box at the top of this page to see what I'm talking about :)
Example
$form['name'] => array(
'#type' => 'textfield',
'#required' => TRUE,
'#placeholder' => t('Enter your name here'),
);
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Module categories: Site Structure
- 1,243 sites report using this module
- Created by bleen on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 7.x-1.x-dev updated 27 Sep 2014 at 20:34 UTC