function apachesolr_autocomplete_form_search_form_alter in Apache Solr Autocomplete 7.2
Same name and namespace in other branches
- 6 apachesolr_autocomplete.module \apachesolr_autocomplete_form_search_form_alter()
Implementation of hook_form_FORM_ID_alter().
File
- ./
apachesolr_autocomplete.module, line 25 - Alters search forms to suggest terms using Apache Solr using AJAX.
Code
function apachesolr_autocomplete_form_search_form_alter(&$form, $form_state) {
if ($form['module']['#value'] == 'apachesolr_search' || $form['module']['#value'] == 'apachesolr_multisitesearch') {
$element =& $form['basic']['keys'];
#$form['#attached']['js'][] = drupal_get_path('module', 'apachesolr_autocomplete') . '/apachesolr_autocomplete.js';
apachesolr_autocomplete_do_alter($element, $form, 'apachesolr_search_page:core_search');
}
}