You are here

function apachesolr_autocomplete_form_apachesolr_settings_alter in Apache Solr Autocomplete 7.2

Same name and namespace in other branches
  1. 6 apachesolr_autocomplete.module \apachesolr_autocomplete_form_apachesolr_settings_alter()
  2. 7 apachesolr_autocomplete.module \apachesolr_autocomplete_form_apachesolr_settings_alter()

Alter the apachesolr.module "advanced settings" form. TODO: Move this off onto each engine.

File

./apachesolr_autocomplete.module, line 540
Alters search forms to suggest terms using Apache Solr using AJAX.

Code

function apachesolr_autocomplete_form_apachesolr_settings_alter(&$form, $form_state) {
  $form['advanced']['apachesolr_autocomplete_suggest_keywords'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable additional keyword suggestions on the autocomplete widget'),
    '#description' => t('Suggest words to add to the currently typed-in words. E.g.: typing "blue" might suggest "blue bike" or "blue shirt".'),
  );
  $form['advanced']['apachesolr_autocomplete_suggest_spellcheck'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable spellchecker suggestions on the autocomplete widget'),
    '#description' => t('Suggest corrections to the currently typed-in words. E.g.: typing "rec" or "redd" might suggest "red".'),
  );
  $form['advanced']['apachesolr_autocomplete_counts'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable counts in autocomplete widget suggestions'),
    '#description' => t('WARNING: Counts shown alongside suggestions might be lower than the actual result count due to stemming and minimum match (mm) settings in solrconfig.xml.'),
  );
}