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.
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 :)
$form['name'] => array( '#type' => 'textfield', '#required' => TRUE, '#placeholder' => t('Enter your name here'), );
- Maintenance status: Minimally maintained
- Development status: Under active development
- Module categories: Fields
- Reported installs: 3,878 sites currently report using this module. View usage statistics.
- Downloads: 46,607
- Last modified: 2 December 2014
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.