Autocomplete input field


I have a input field that when type a text and give enter or push add it is in a list. What I also want is that when I type it have to look in a database and when the same word or part of that word is in the database it autocompletes.

With a searchbar it can be done but I want also that when push the add button it comes in the list, I know it have to be possible but someone know how or where to find some about this?

Sorry, what exactly do you want to happen when?

Ok, my question is little confusing, here the question :

In a database I have different products for computers, visitors can create a sort of shopping list. Let’s say the memory cards are for sale, when a visitor starts typing memory, I want that the sale memory cards then shows up while the visitor is typing so he/she can see there are some of the products for sale… And then when one of them is selected it comes in the shopping list

Where should they appear? In an auotcomplete to the input field or somewhere else?

I guess under the field and when select one of them then in the shopping list right under the input field

Then you should just bind the input to a variable, reload the data on changes and display it under the field.