Autocomplete enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.
Autocomplete can be added on to almost any text input field. It should be used in a field where the same content is often entered. For example, in the keywords field on the initial care page you might enter in "cat caught" frequently. To simplify entering in this information you could designate keywords as an autocomplete field add give it the value "cat caught". You could also designate other keywords such as "dog caught, hit window, hit by car, poison, etc..." Then, the next time you start typing in the keywords field, a list of potential keywords matching your text will drop down.
Other common fields to use this extension for are the rescuer city or city found.
When the Autocomplete extension is activated it will appear on the far left sidebar. Select Autocomplete settings. To add a new autocomplete, first select the input field you want, then write in a comma separated list of values you want to be used for that autocomplete. If you want the user to be able to select more than one value, choose Yes for “Multiple values?” then hit “Update autocomplete settings” to save.
By default only one value can be used when typing in a field, however you can allow fields to use multiple values by select that setting in the autocomplete settings. An animal only is found in one city but could have hit a window and be cat caught.
This extension uses the jQueryUI Autocomplete Widget. Thorough documentation can be found at http://api.jqueryui.com/autocomplete
To add a new autocomplete, first select the input field you want, then write in a comma separated list of values you want to be used for that autocomplete. If you want the user to be able to select more than one value, choose Yes for "Multiple values?" then hit "Update autocomplete settings" to save.
To delete an autocomplete, simple erase all the values for the autocomplete that you want to delete and hit "Update autocomplete settings" to save.
Callbacks are pre-wrapped by a function and passed the function arguments.
function(a, b, c) { YOUR CODE GOES HERE }
Remote Data Source provides the most flexibility and can be used to connect any data source to Autocomplete. If the data is from a remote source then the 'Multiple values?' option will be overridden to No. The callback gets two arguments:
The value currently in the text input.
On Select Callback: Triggered when an item is selected from the menu. The default action is to replace the text field's value with the value of the selected item. Canceling this event prevents the value from being updated, but does not prevent the menu from closing. The callback gets two arguments:
The selected item.