You are here

function customerror_form_search_theme_form_alter in Customerror 7

Implements hook_form_FORM_ID_alter().

We need this to be able to search from the error pages, otherwise the form POST's to the error page, bringing no results page.

File

./customerror.module, line 358
Enables custom 404 (not found) and 403 (access denied) pages in Drupal.

Code

function customerror_form_search_theme_form_alter(&$form, &$form_state, $form_id) {
  if (arg(0) == 'customerror') {
    $form['#action'] = url('search/node');
  }
}