Field Placeholder module gives support to add HTML5 placeholder attribute to field widget forms.

By default, this module integrates text, number and mail modules, but any other widget type can be added through hook_field_placeholder_info().

Field placeholder adds a new option in field settings page to enter the placeholder value, which is included automatically when the widget is rendered.

You can make the most of this module using it with Entityforms module.

i18n_field integration
Since 7.x-1.0-rc2, this module provides a submodule named i18n_field_placeholder. This submodule allows to translate the placeholder value through i18n_field interface.

Non-HTML5 browsers support
Given that placeholder attribute was introduced in HTML5, this module did not work with older browsers. To avoid this problem, branch 7.x-2.x has been released. This branch provides the same features that 7.x-1.x branch, but also includes old browsers support thanks to Placeholder.js library. To include this support you have to download this file and place it in path/to/libraries/placeholder/placeholders.jquery.min.js. In case you don't want to include this library, it degrades smoothly. This branch requires Libraries module.

This project has been developed thanks to the ideup! support.

Project Information