Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

Passing hidden input fields in HTML Select option

$
0
0

Does anyone know if it's possible to pass a hidden request parameter in with a <select><option> element in a HTML form?

So for example, if the user selected <option value="foo">foo</option> from a <select> list of options, could I somehow pass a hidden value in, as well as the "foo" value, and retrieve that as a request parameter? E.g. <input type="hidden" name="x" value="bar"/> would enable me to get the values "foo" and "bar" from the request when the user selected the foo option.

Thanks


Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>