Seems that site search box do not take search type into account:

function search_box_form_submit($form, &$form_state) {
  $form_id = $form['form_id']['#value'];
  $form_state['redirect'] = 'search/node/'. trim($form_state['values'][$form_id]);
}

It is always passing 'search/node/' as a default search type. I want to have my search type to be used as default instead of node. Maybe it would be better to implement any hidden parameter in form showing the search type? If it is not present search_box_form_submit will use 'search/node/' as type. This would provide backward comportability.

Thanks,
Grigory

Comments

douggreen’s picture

Version: 6.2 » 7.x-dev

I think that your solution is to override theme_search_form(). But I'm bumping this to a 7.x feature request.

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev

Well, this didn't make it into Drupal 7, sorry! Bumping to Drupal 8 at this point.

jhodgdon’s picture

Title: Add more freedom to search box submission » Allow UI to choose which search module is default tab
jhodgdon’s picture

Status: Active » Closed (duplicate)