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;ÊÊÊ }Ê }Ê

 

  • Author: Darko Hrgovic

© 2019 Agentic Digital Media

You can enable/disable right click