Vous êtes ici

Configure forms and suggestions on version 4.x

Vous avez 30 secondes ?
S'abonner au flux d'actualités
Navigate to Search Autocomplete admin page :
- For D6 at : admin/settings/search_autocomplete
- For D7 at : admin/config/search/search_autocomplete.
Click on the configure link of the form you wish to configure.
You are now redirected to admin/config/search/search_autocomplete/3/configure. Let's describe the various configuration settings available :
  • HOW
    • Minimum keyword size that uncouple autocomplete search: The minimal number of character the user should enter in the form before autocompletion starts. (Note: an AJAX request is sent the first time suggestions are needed. For instance when the user enters lor, suggestions such as lorem or lorinum are retrieved using AJAX. If the user then completes with e, only lorem is kept in suggestions but the filtering is done using javascript, no more through the AJAX callback. Suggestions are also cached to limit the number of AJAX calls.)
    • Limit of the autocomplete search result: The number of suggestions you wish to be displayed during autocompletion.
    • Behaviour when no suggestions are found: A text to be displayed if the user input does not have any possible corresponding suggestion. This is optional and will not fire if left empty.
    • Auto Submit: If enabled, the form will be submitted automatically as soon as your user choose a suggestion in the popup list. This option simply submit the form but does not alter its behavior. In other words: if used in a search box, a basic drupal search will be made using the suggested text.
    • Auto redirect: If enabled, the user will be directly redirected to the suggestion node he choosed instead of performing a form validation process. Only works if "link" attribute is existing in the suggestion and if "Auto Submit" is enabled.
  • WHAT
    • Suggestion source: Choose the source of suggestions. This can be either a URL callback: external or internal or a static resource.
      • URL callback: this is a URL returning a JSON representing a suggestion. This URL can point to an external service or to an internal URL of your site. You can build such a suggestion list using the view plugin style embedded in this module.
      • Static resource: suggestion can also be suggested using a static data list. This should only been used in the rare cases where views is not enough to populate your suggestions. Suggestions must be entered one per line with the JSON syntax similar at what the views can produce. Have a look at the URL /nodes-autocomplete to know more.
      • Use an existing view: this input list let's you choose an existing view to use as an autocompletion callback. This has to be a view using the JSON autocomplete style.
    • Select a theme for your suggestions : You can select a different theme for each of your forms. This CSS applies to how suggestion drop-down list will be styled (see below to custom your own theme).
Save configuration. Excepted the advanced options, all your settings have been duplicated to every child forms.
Congratulation, your module is configured!

Custom your own CSS

This documentation need further work, please come back later.
Aucun vote pour le moment
Vous avez aimé: