How To remove "Search" text in TB Purity search Form?

+1
-20
-1

Hi,

thank's for awesomes templates, it is possible to remove search text in Search button Form in TB PURITY Template ? how to ?

Alex

+1
-24
-1

Hi Alex,

There're two ways to do what you need:
- The first is override template_preprocess_search_block_form
- The second, more simple, you can use JS to do it

HaiNN

Comments

Hi HaiNN,

Hi HaiNN,

thank's for reply. These two ways are too advanced for my skills, can you show me a little exemple or a link for more knowledge about this customization?

Thanks
Alex

HI,

HI,

I've solved with :

(function ($) {
Drupal.behaviors.mysiteSearch = {
attach: function() {

var submit = $('#block-search-form').find(":submit").attr('value','');
$('#block-search-form .form-type-submit .form-text')
.attr('size', 30)
// Add default text options on blur.
.blur(function () {
$(this).attr('value', Drupal.t
('Enter search query ...'))
.click(function () {
$(this).attr('value', '');
$(this).unbind('click');
});
})
// Trigger the blur event to set things up.
.blur();
}
};
}(jQuery));