Lightweight AJAX autocomplete for Bootstrap
- Easy to use alternative to Typeahead/Bloodhound
- Returns the ID and value (label) of selected
- Results can be chained/filtered by other form values
Click here to see the examples in action.
$('#input').bootcomplete({url:'/search.php',options});
[
{
"id" : "someId",
"label" : "some label name"
}
]
-
url: The url to submit query
-
method: Request method (get, post)
-
wrapperClass: CSS Class used for the element wrapper
-
menuClass: CSS Class used for the suggestions menu
-
idField: Include hidden input field for selected option id (true,false) Default: true
-
idFieldName: Hidden input field name. Default: elementName_id
-
minLength: Minimum string length before sending query request
-
dataParams: Send additional data parameters with request. Usage:
dataParams: {keyName : value}
-
formParams: Send chained form parameters with request. Usage:
formParams: {keyName : $('#formElement')}