Sublime directory Surf the web anonymous Pagerank Monitor


Validate_fields class not working with checkboxes, radios and select menus.

davemorris80
Thu 14 September 2006, 05:24 pm GMT +0300
I have been playing around with the validate_fields class and have been trouble with getting checkboxes, radio buttons and select boxes to validate.

Have managed to validate textboxes and textareas ok though so thats a start. Any ideas or examples?

Thanks,

Dave

davemorris80
Fri 15 September 2006, 12:11 pm GMT +0300
Ok,

Have sorted out SELECT boxes out. They're just the same as text funnily enough so apologies for that lame one.

Still can't get the checkboxes to work.The error message i get is: The value in field "Visible?" is not valid.

This is my code: $example->add_check_box("Visible?", $_POST['inpVisible'], "checkbox", "y");
and also have tried: $example->add_check_box("Visible?", $_POST['inpVisible'], "checkbox"); and get the same error.

Any pointers?

Thanks

olaf
Fri 15 September 2006, 12:26 pm GMT +0300
Ok,

Have sorted out SELECT boxes out. They're just the same as text funnily enough so apologies for that lame one.

Still can't get the checkboxes to work.The error message i get is: The value in field "Visible?" is not valid.

This is my code: $example->add_check_box("Visible?", $_POST['inpVisible'], "checkbox", "y");
and also have tried: $example->add_check_box("Visible?", $_POST['inpVisible'], "checkbox"); and get the same error.

Any pointers?

Thanks

that's the wrong use check the usage in the example: validation_demo.php

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional