i have been looking for a solution all day, i need some help. I created a single search box using views combine exposed filters. i am using bartik theme. On the exposed filter, i have added some default text using the following code in my template.php file as per this code snippet:
function bartik_form_views_exposed_form_alter(&$form, &$form_state) {
if (!isset($form_state['view']->exposed_input['combine'])) {
// OK to set the default value
$form_state['input']['combine'] = 'Find Professionals';
}
}
So far, my default text is showing, but i need to achieve 2 things:
- Make default text to disappear when user clicks on the search box
- Prevent user from searching default text.
ps: "combine" is the name of my views exposed filter, while "views_exposed_form" is the form id.
Thanks for your help in achieving this.