To understand better the following paragraphs about Search Autocomplete settings, you have -as a site administrator- to understand the three main objects used and/or defined by this module. The point is easy: it enables autocompletion on forms to suggest suggestions from various suggestion types.
- Form: in the context of Search Autocomplete module, a form refers to the input field of an actual HTML form to be autocompleted (no matter if created through Drupal form API or not).
- Suggestion type: refers to the type of the suggestions that can appear in a form. For instance "node titles", "usernames" or "comment titles".
- Suggestion: one individual suggestion such as appearing in the autocompletion panel of a form.
Next figure illustrates the form "Search Theme Box" being autocompleted with "Any words" suggestion type. There is three suggestions containing the substring "mod".
1- Navigate to the Search Autocomplete admin setting page:
- for Drupal 6: Admin >> Configuration >> Search Autocomplete, accessible at admin/settings/search_autocomplete
- for Drupal 7: Admin >> Configuration >> Search Autocomplete, accessible at admin/config/search/search_autocomplete
Prepare configuration (optional)
2- This first page allows you to speed-up configuration by replicating settings. Using the draggable anchors you can move the forms in the list to order it hierarchically. From then, configuring the parent form will duplicate its settings (expect "Advanced Settings") to all child forms. You can use this if many forms should have the same configuration.
Let's suppose that all forms should be configured using the same settings but the two Search Page forms which need a little more custom. One solution for this is the hierarchy shown in Figure 2. The user will configure only the Search Box theme. His settings will be duplicated to every other forms. Then, by customing the Search Page node form, he will custom both Search Page forms at the same time. This just aims at speeding configuration but is totally optionnal.
Configuration of existing forms
The Search Autocomplete admin page (see 1) is the main entry admin page for this module. It's consists in a list of all the forms of your site you can decide to autocomplete. On each line of the array is shown a different form. Here are the interesting elements:
- anchor: let's you order hierarchically your forms (see 2).
- description: a human readable description for you to remember what the form is about
- checkbox: check this checkbox to enable autocompletion for this form. Therefore you can have forms not autocompleted: no need to delete it!
- configure: a link to a configuration page where you can configure the form. This will let you choose the different suggestions displayed when using the form, as well as some more features.
- delete: a way to unlink the form from Search Autocomplete module. This does not mean the page or form is deleted but just that you cannot use autocompletion on it anymore.
In version 3.1+ : If you use the module "transliteration", a new option is available. It let's your user browse suggestions regardless for special characters. In other words, in versions 2.x and 3.0, if you have a node title called "fôooo" and the user enters "foo", it will not be suggested. With translite option activated, all "fôobar", "föoo" and other typos will be suggested.
3- Click on the configure link of the form you wish to configure.
- Version 2.x: configure forms and suggestions on version 2.x
- Version 3.x: configure forms and suggestions on version 3.x
4- Save configuration. Excepted the advanced options, all your settings have been duplicated to every child forms.
You finished with admin configurations. Just two more steps :
5- Navigate to admin permission page and enable permissions for Search Autocompletion. Choose which roles can administrate and configure autocompletion and which can use it.
WARNING ON 2.x : the permission called "administer Search Autocomplete" lets the access to configuration and advanced configuration pages for Search Autocomplete. In version 2.x, Advanced configuration let's you input queries in the database, this is a security issue : you MUST only give this permission to trusted users or roles.
6- Browse your website and test if your form is correctly behaving according to your settings.