toolman Posted October 12, 2016 Share Posted October 12, 2016 Hi there, I have the following select: <select name="place"> <option value="place1">Place 1</option> <option value="place2">Place 1</option> <option value="place3">Place 1</option> <option value="place4">Place 1</option> </select> What I would like to do is display another select dropdown if either option "place2", "place3" or "place4" is selected. How would I do this? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/302320-jquery-showhide-select-based-on-dropdown-selection/ Share on other sites More sharing options...
codefossa Posted October 12, 2016 Share Posted October 12, 2016 You just need something to tell which should show / hide. You can use the value in your above example and have that be the value of a parameter on the other selects. When onchange triggers, you can hide them all then show the one(s) you want. https://jsfiddle.net/aLkz2aw1/ Quote Link to comment https://forums.phpfreaks.com/topic/302320-jquery-showhide-select-based-on-dropdown-selection/#findComment-1538233 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.