Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: validating drop down options
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
View User's Profile View All Posts By User U2U Member
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.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Product Demonstrations Product Demos
Registration Form Validation
Login Form Validation
Free Download Free Download
Product Documentation Documentation
Documenation Page
Change Log
Validators Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004