Board Logo

validating drop down options
casablanca - 11/20/2007 at 11:40 PM

<input type="hidden" name="product[0]" value="Aplix">
<select name="product[1]">
<option value="">Choose size
<option>Extra Large
<select name="product[2]">
<option value="">Choose stitching
<option>Natural stitching
<option>Colour stitching

var hna_fields = {

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 - 11/21/2007 at 10:11 PM

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.

Back to forum: