livevalidation
livevalidation copied to clipboard
Radio field ?
Hi there,
What about the radio field ? I think this feature is more than required.
Great script anyway.
Regards, Michael
What kind of validation would you need for a radio field when you can only select one? Can you give a use case? Note that you can easily disable radio fields in javascript (http://www.google.ca/search?gcx=w&sourceid=chrome&ie=UTF-8&q=disable+radio+button+javascript#sclient=psy-ab&hl=en&source=hp&q=disable+radio+button+stackoverflow&pbx=1&oq=disable+radio+button+stackoverflow&aq=f&aqi=&aql=1&gs_sm=e&gs_upl=1013l1013l1l1463l1l1l0l0l0l0l171l171l0.1l1l0&bav=on.2,or.r_gc.r_pw.&fp=1cea92fb4518212&biw=1920&bih=955).
How do you use it to validate a radio button to make sure the user selects one option?
This is an example usecase:
< input type="radio" name="answer" value="one" /> in 1 restaurant < input type="radio" name="answer" value="two" /> in 2 restaurants < input type="radio" name="answer" value="five" /> in 5 restaurants < input type="radio" name="answer" value="nine" /> in 9 restaurants
So how do we make sure a user has clicked on one of the four options when there is no specific id that can describe all four options simultaneously?
cheers and keep up the good work!
i'd like to see this too - same reason as above. make user select one of multiple options, when there is no obvious pre-selected option. maybe this should be a dropdown select menu in the html, but then can this be validated?