A client has given me a task to do that I've not done before, and so I'm looking for the best way to do it. They have a form they want users to fill in, but for one field, they want an option of thousands to be placed into three dropdown menus.
For example:
So a user will only be able to choose a Venue once they've chosen a City, only a City once they'd chosen a State. (A nice way to break up the thousands of options.)
I suppose I could this quite easily using POSTBACKs and a simple database, but I imagine that doing something with AJAX and a simple database would be the slicker solution.
Are there any other ways that this problem might be tackled? If not, does anyone have any links to tutorials or code snippets I could grab? Secondly, how long do you think it would take you to implement such a system?
I've never done this before so I'm hoping to avoid as many unforeseen pitfalls as possible. Thanks.
To select multiple options in a drop-down list, use the multiple properties. It allows you to select more than one option while pressing CTRL key.
When you create a drop-down list, you can only make one selection. If you select another item, the first one is replaced with the new selection.
How about a simple jQuery Autocomplete solution?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With