PDA

View Full Version : Validating a checkbox group


spideydan294696
04-07-2010, 11:05 AM
I keep getting an error when I submit my form for those form elements that are multiple checkboxes with the same name/ID. I have a checkbox group to allow multiple selections of those checkboxes (only 1 needs to be checked to be valid). Am I receiving this js error (object doesn't support this property or method) because I have multiple checkboxes with the same name? And if so, is there a workaround to make this error-free?

I am using ASP/vbscript.

Jason Byrnes
04-07-2010, 12:10 PM
please send a link to your page where I can see the problem occur to be able to investigate the cause.

spideydan294696
04-07-2010, 12:22 PM
Here's a link to a test instance:

http://www.us.capgemini.com/validationtest.asp

Jason Byrnes
04-07-2010, 12:33 PM
In the Show validation Errors behavior, you need to uncheck the "Set Focus to first invalid field" Option. Since you check boxes all share the same name, it cannot determine which one is the first invalid field on error.

spideydan294696
04-07-2010, 12:39 PM
Thanks Jason - that worked!