How to create two related dropdown list boxes #dependent dropdown
Edit
by Prama Pakwan - 9 years ago (2015-04-16)
Link a second dropdown list box with the first one
| There are two dropdown list boxes in my form.
I need to show options in the second dropdown automatically based on the selected option of first dropdown list box. |
Ask clarification
1 Recommendation
Cascade Select: Generate two dependent HTML form select inputs
This class is meant to generate two HTML form select type inputs making the currently selected value on the first input determine the option values that are made available on the second.
It uses JavaScript to update the second input options when the first input changes.
The class comes with an example that defines the options for both input from data defined by arrays, and also an example that retrieves the options values from MySQL database query results.
| by Dave Smith 7620 - 9 years ago (2015-04-19) Comment
What you are looking to accomplish is called cascading selects. Here is one class that can show you how to do it. |