Drupal 6 - Expand Advanced Search fieldset if no keywords
Add this to your helper module:
/**
* Implementation of hook_form_alter().
*
*/
function agentic_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
case 'search_form':
if (!arg(1)) { // if it's only /search and no keywords, expand the advanced search fieldset
$form['advanced']['#collapsed']=FALSE;
}
break;
}
}
Comments
Post new comment