The script code below makes ghost text
$('.ghost-text').each(function(){
var d = $(this).val();
$(this).focus(function(){
if ($(this).val() == d){
$(this).val('').removeClass('ghost-text');
}
});
$(this).blur(function(){
if ($(this).val() == ''){
$(this).val(d).addClass('ghost-text');
}
});
});
But on submit it passes that default ghost value. How to delete it on submit?
I believe its better to use a placeholder:
Or if you want to stick with your js: