You are here

function customerror_form_alter in Customerror 6

Same name and namespace in other branches
  1. 5 customerror.module \customerror_form_alter()

Implements hook_form_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 321
Enables custom 404 (not found) and 403 (access denied) pages in Drupal.

Code

function customerror_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case 'search_theme_form':
      if (arg(0) == 'customerror') {
        $form['#action'] = url('search/node');
      }
      break;
  }
}