How to create a dropdown user control?

If I wanted to create a field on an RSVP webform for the user to type in their name, but only allow names that are in a given list/database how would I go about doing that without a dropdown list?

  • As a bonus having a small "Autofill dropdown" showing probable matches from the database ala facebook search would be crazy great.

  • Answer:

    Hi, I am in the process of finalizing something similar to what you need. So far, the best thing that I have run across is this code: http://www.pengoworks.com/workshop/jquery/autocomplete.htm , it enables you to autofill both from local data(within the html file) and also via AJAX(MySQL,etc). You can also probably add some Javascript code which will disallow users to add extra characters after the selected autofill value. Hope this helps

Bleron Limani at Quora Visit the source

Was this solution helpful to you?

Other answers

You probably want to use the autocomplete feature. juqery UI comes with built in autocomplete widget: check this http://jqueryui.com/demos/autocomplete/

Prashant Chaudhary

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.