Default values on form input elements that disappear when clicked on

Having an example or description value inside the form element for input elements that are missing a title or description. With this small code snippet as an example, this can be done in Drupal forms quite easily by adding these attributes to the form input item array.

<input name='horsename' id='horsename' type='text' size='35' maxlength='35'  style='color:#888;' value='enter full or partial name'
	  onfocus="if (this.value == 'enter full or partial name' ) this.value=''; this.style.color = '#000';"
	  onblur="if (this.value == '') { this.style.color='#888'; this.value='enter full or partial name'; }">

The validation handler needs to be made to treat the default values like they are empty, or remove them from the form before anything else validates it.

This would probably be better served by a global jQuery script and some special value it tagged onto to change all form elements on the page. It could also remove the still default values from the form before submit.

There is a much larger discussion on this, along with a larger example, over here: http://webdeveloper.beforeseven.com/jquery/default-text-field-value-disappears-focus