Reputation: 8726
I have a select option just like below.
<select name = "type">
<option value="">Select one</option>
<option value="1">Abc</option>
<option value="2">Xyz</option>
</select>
I tried to get the value using Input::get('type')
But getting the labels Abc
. I need to get the value as 1
or 2
or 3
depending on the one that I'm selecting. I even tried this
<select name = "type" onchange="document.getElementById('typeId').value=this.options[this.selectedIndex].value;">
But same thing happened. How can I do this?
Upvotes: 0
Views: 1852