Forms
Auto Complete
AutoComplete.js is a simple pure vanilla Javascript library.
Requirements
<script src="js/vendor/autoComplete.min.js"></script> <script src="js/cs/autocomplete.custom.js"></script>
Example
Javascript
var autocomplete = new AutocompleteCustom('strictArray', 'strictArrayResults', { data: { src: [ 'Anpan', 'Basler Brot', 'Cheesymite Scroll', 'Dorayaki', 'Fougasse', 'Guernsey Gâche', 'Kalach', 'Lefse', 'Matzo', 'Naan', 'Paratha', 'Pistolet', 'Rewena', 'Shirmal', 'Teacake', 'Vienna Bread', 'Zopf', ], }, placeHolder: 'Search', searchEngine: 'strict', highlight: true, });
Html
<div class="autocomplete-container"> <label class="form-label">Search</label> <input type="text" id="strictArray" class="form-control" autocomplete="off" /> </div>
More Examples
You may find more examples in
Interface.Forms.Controls.Autocomplete.html
file which is initialized by js/forms/controls.autocomplete.js.