However, when the 2nd radio button is selected, it comes up with the "please fill in all required fields" error.Radio buttons presence will evaluate to true if the radio button has a value set, but the radio button isn't selected.Again, this might need to be tweaked depending on your specific HTML.The scripts in this page helped me come up with the script below, which I think is more complete and universal.You should not use document as the name of an HTML element.And you cannot place focus on a radio button group.Hi there, I am in the process of implementing some Java Script validation to my contact form.When I press submit with a radio button checked, my custom error message still appears.
I have a form that has 4 "required fields" that validate using JS.
You want on Submit="return Validate Form() && return validate();" Sorry, my mistake - should be on Submit="return Validate Form() && validate();" But there are other problems as well.
i'll post the coding ive done so far if that will be any help to anyone that could help me...... He thought he saw a Coach-and-Four That stood beside his bed: He looked again, and found it was A Bear without a Head. i want to make sure a radio button is selected before submitting the form...... i knw it sounds silly but need help on it just so confused on it....... Someone before me wrote the actual page and I, of course, needs to fix it.
Basically it will validate any number of radio buttons in a form, meaning that it will make sure that a radio option has been selected for each one of the different radio groups within the form.