I need to have the appropriated data selected when a screen displays. I do not want the person to beable to change this so
I will disable the select drop down.
However when the page is submitted I need to get that value.
select has a disabled but no readonly. Therefore the value is not passed
I am looking at possible solutions but what I did not know and want to varify is that
you can have a drop down (select) with a name and an hidden input tag with the same name.
Therefore upon submit the server will only receive the value from the hidden tag?
This is possible?
<form action="demo_form.asp">
<select name="sCar" disabled>
<option value="volvo" selected>Volvo</option>
<option value="saab" >Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<input type="hidden" name="sCar" value="volvo" ><br>
<input type="submit" value="Submit">
</form>
I will disable the select drop down.
However when the page is submitted I need to get that value.
select has a disabled but no readonly. Therefore the value is not passed
I am looking at possible solutions but what I did not know and want to varify is that
you can have a drop down (select) with a name and an hidden input tag with the same name.
Therefore upon submit the server will only receive the value from the hidden tag?
This is possible?
<form action="demo_form.asp">
<select name="sCar" disabled>
<option value="volvo" selected>Volvo</option>
<option value="saab" >Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<input type="hidden" name="sCar" value="volvo" ><br>
<input type="submit" value="Submit">
</form>