mantra
09-06-2008, 04:16 PM
I have a HTML form that has a menu/select field with some options:
<select name="Room Type" id="Room Type" onChange="KW_calcForm('total',1,-1,'#Reg Type','+','(','#No of Rooms','*','#Room Type',')','*','#No of Nights')">
<option value="0"> </option>
<option value="75.00001">Ocean Front Double Bed - $75</option>
<option value="75.00002">Ocean Front King - $75</option>
<option value="75.00003">Ocean Front King Jr. Suite - $75</option>
> <option value="155">2 Bedroom Exec Suite - $155</option>
<option value="165">3 Bedroom Exec Suite - $165</option>
</select>
So for example, if the user selects Ocean Front King - $75, the value is $75.
However, the value that gets saved into my database is 75, and not 'Ocean Front King - $75' ...
Is there anyway to save the Item Label instead of the value ???
Or any workaround?
<select name="Room Type" id="Room Type" onChange="KW_calcForm('total',1,-1,'#Reg Type','+','(','#No of Rooms','*','#Room Type',')','*','#No of Nights')">
<option value="0"> </option>
<option value="75.00001">Ocean Front Double Bed - $75</option>
<option value="75.00002">Ocean Front King - $75</option>
<option value="75.00003">Ocean Front King Jr. Suite - $75</option>
> <option value="155">2 Bedroom Exec Suite - $155</option>
<option value="165">3 Bedroom Exec Suite - $165</option>
</select>
So for example, if the user selects Ocean Front King - $75, the value is $75.
However, the value that gets saved into my database is 75, and not 'Ocean Front King - $75' ...
Is there anyway to save the Item Label instead of the value ???
Or any workaround?
