Clearing Default Fields with Gravity Forms

[sourcecode language=”javascript”]
jQuery(document).ready(function() {

jQuery.fn.cleardefault = function() {
return this.focus(function() {
if( this.value == this.defaultValue ) {
this.value = "";
}
}).blur(function() {
if( !this.value.length ) {
this.value = this.defaultValue;
}
});
};
jQuery(".clearit input, .clearit textarea").cleardefault();

});
[/sourcecode]

Source: http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/

Leave a Reply

Your email address will not be published. Required fields are marked *