You are here

function customerror_form_alter in Customerror 5

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

Implementation of 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 235
Enables custom 404 (not found) and 403 (access denied) pages in Drupal with no need for creating real nodes under taxonomies

Code

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