Reputation: 383
I have the textbox
where the teacher has to tag the students on photos.
The student list is very long and may be have the same name. So i want to have the Auto suggestion like we have in tags in stackoverflow where i can have the small area like student name and his photograph and DOB , so that they are easy to select.
Can anyone please point me what things i need to do for that.
Upvotes: 1
Views: 586
Reputation: 11351
Maybe you would like to use this bundle:
https://github.com/genemu/GenemuFormBundle
It provides several new form types for you to use in your forms. One of them is a jQuery autocomplete form field which is just what you need. It is quite easy to configure and it is quite powerful, with several sources available for the autocompletion data (text, database, ajax...)
Upvotes: 1
Reputation: 12836
For autocomplete solutions, the basic idea is that on keypress in the textbox, you will fire an ajax call which will run some queries against db using regex or soundex and returns a small matching list/dataset which it will show under the textbox to mimic the look and feel of a selectable drop-down of suggestions or put it in the textbox. jQueryUI has a plugin for this which you might be interested in: http://jqueryui.com/demos/autocomplete/
Upvotes: 3