You are here: irt.org | BBS | Re: Check box form validation [This BBS is closed]
Posted by Pat on July 01, 1998 at 11:18:53:
In Reply to: Re: Check box form validation posted by Martin Webb on June 11, 1998 at 12:51:03:
: : I need to validate that a check box has been selected, or that one of several radio buttons has been selected in a form. The goal is to make sure a user doesn't forget to select at least one of the radio boxes or check boxes. I have no difficulty validating text fill-in boxes, but have been stupped validating check boxes and radio buttons.
: : Thanks in advance for any help or suggestions.
: : Bill
: : (I'd appreciate an email reply.)
: The article "Check Boxes and Radio Buttons" at http://www.irt.org/articles/js027/index.htm covers this.
: [replied by email]
I checked out the above mentioned url and it's not clear how to use it for validating a form field. It tallies up unanswered as well as correct and incorrect, but doesn't really solve the problem. I too am interested in preventing unfilled form fields from being submitted. Is there something I could include that is a simple perl snippet or javascript that will just refuse to allow it to be submitted if a field is left blank? I just want to use a shotgun approach and require that all fields be filled out. I neither want to tally them, list them or direct the the user to the unanswereded field. A simple alert box or html page saying "You failed to complete one or more fields in the form" would suffice. Thanks for any help.
Follow-ups:
You are here: irt.org | BBS | Re: Check box form validation [This BBS is closed]