I would like to add text completer in fields of my form. I don't really know how they call it, I just thought the closest would be "text completer".
What I want it to do is very simple. Let say I want to write "Broken DC Jack". I want my code to start guessing what I am going to write and give me up to 3 selections when I write "Broken". Example; "Broken CPU", "Broken Memory", "Broken DC Jack" so I can choose which ever I want then I don`t have to continue writing whole phrase, it adds itself.
If you're aren't up for implementing your own. jQueryUI has a pretty decent autocomplete with examples.
http://jqueryui.com/demos/autocomplete/
<script>
$(function() {
var availableTags = [
"ActionScript",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
</script>
<div class="demo">
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>
</div><!-- End demo -->
<div class="demo-description" style="display: none; ">
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.</p>
<p>The datasource is a simple JavaScript array, provided to the widget using the source-option.</p>
</div><!-- End demo-description -->
It's called auto-complete
JQuery UI has this widget, check this out
You're looking for this: http://jqueryui.com/demos/autocomplete/