casablanca
Junior Member
Posts: 2
Registered: 11/20/2007
Member Is Offline
|
| posted on 11/20/2007 at 11:40 PM |
|
|
validating drop down options
<input type="hidden" name="product[0]" value="Aplix">
<select name="product[1]">
<option value="">Choose size
<option>Small
<option>Large
<option>Extra Large
</select>
<select name="product[2]">
<option value="">Choose stitching
<option>Natural stitching
<option>Colour stitching
</select>
var hna_fields = {
'product[1]':{'l':'Size','r':true},
'product[2]':{'l':'Stitching','r':true},
'qty':{'l':'Quantity','r':true,'f':'unsigned'}
},
Any ideas why this doesn't work? Product[1] and [2] always come back saying they are required fields. I have tried taking out the array and calling
them Product1 and Product2 but it makes no difference.
I've got all the other code in - a quantity field validates fine as an integer. I've just reproduced here the parts relating to my query.
thanks, Robin
|
|
|
casablanca
Junior Member
Posts: 2
Registered: 11/20/2007
Member Is Offline
|
| posted on 11/21/2007 at 10:11 PM |
|
|
sorted
each option needs the value explicitly defined. this isn't necessary to post the data (it will by default post the text after the option tag) but it
is for validation.
|
|
|