When no search terms are present, search_config doesn't kick in.

I just patched search_config's form_alter in my version to let it.

    // if (arg(1) == 'node') {
    if (arg(0)=='search') {

The reason is that I like to expand the advanced search form when users just hit the search button (code below for anyone interested).

In your helper module's form_alter:

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

darkodev’s picture

Oops, that wasn't good. Doesn't let search_config kick in when using search 404. Better to remove the arg(1) condition altogether.

canen’s picture

Status: Active » Fixed

I see no immediate harm in doing this. Committed in http://drupal.org/cvs?commit=216036.

darkodev’s picture

Thanks, canen!

canen’s picture

Status: Fixed » Active

dhrgovic,

Sorry to disappoint but I will need to revert this since it breaks the search forms on none node search types. See http://drupal.org/node/477802

I'll see if there is another way to easily implement it.

Alan D.’s picture

Version: 6.x-1.x-dev » 7.x-1.0-beta1
Category: feature » bug

Fixed in D7

Alan D.’s picture

Version: 7.x-1.0-beta1 » 6.x-1.x-dev
Alan D.’s picture

Status: Active » Closed (works as designed)

Related task suggested by canen is closed and the code here is no longer applicable.