Hint provides a simple API for adding JavaScript "hint" text to text and password fields. The "hint" is shown inside of the text field until the user clicks or gives focus to the text field, then the hint text is cleared, allowing the user to enter their own content.

This module is no longer supported or developed. Back when this was written (circa 2009), HTML5 did not exist. These days you can easily accomplish the same effect by using a "placeholder" attribute. You can accomplish this in Drupal forms by using $element['#attributes']['placeholder'] = t('Placeholder text');
  • Works with both textfields and password inputs.
  • Uses the "title" attribute for the hint text content.
  • Easily add a hint to any text field by using the #hint Form API property.
  • Includes sample implementations for the search and user login forms.

This module built by robots: http://www.lullabot.com
Written by Nathan Haug (quicksketch)

Project information