You are here

function activesearch_form_alter in Javascript Tools 5

Implementation of hook_form_alter().

File

activesearch/activesearch.module, line 45

Code

function activesearch_form_alter($form_id, &$form) {
  if (activesearch_supported_browser()) {
    if (isset($_POST['activesearch']) && in_array($form_id, array(
      'search_form',
      'search_theme_form',
      'search_block_form',
    ))) {
      $form['#submit']['activesearch_submit'] = array();
      $form['#validate']['activesearch_validate'] = array();
    }
    if ($form_id == 'search_form') {
      $form['#suffix'] .= '<dl class="search-results"></dl>';
      $form['page'] = array(
        '#type' => 'hidden',
        '#value' => '',
      );
    }
  }
}