I would like to build a combo box in Rails 3.
It’s a mix of input textfield and a dropdown menu.
What would be the best way to proceed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no standard implementation of a combobox in html.
Either you provide a simple drop-down box, and add a
+button allowing to dynamically add new items to the list (javascript). This is not bad if the number of items does not change too often.An often used alternative is to use a standard text-field, and use an autocompleter to suggest the possible options, but allow to user to deviate.
Or you google for the numerous examples of fake combobox (e.g. editable drop-down-box) implementations using javascript.