PDA

View Full Version : How do you mark radio buttons as required in a form?



tpattison
2 May 2007, 12:13 PM
I have a form that has 3 radio button on it. I need to have it so that the user is required to select one of the radio buttons. I've searched the forum and the documentation and I didn't find anything related. I did notice that "allowBlank was not a config option for this control.

Any ideas?

Thanks Tim

brian.moeskau
2 May 2007, 8:45 PM
Any reason you can't set a default selected radio? If not, maybe a dropdown would be better as it can more properly be "blank" and required. I always find radio buttons that all default to blank but required to be somewhat strange personally. If you insist on having that interaction, you may have to manually check that the field has a value on submit since there is no concept of a radio "list" right now with built-in validation.

tpattison
2 May 2007, 8:57 PM
Any reason you can't set a default selected radio? If not, maybe a dropdown would be better as it can more properly be "blank" and required. I always find radio buttons that all default to blank but required to be somewhat strange personally. If you insist on having that interaction, you may have to manually check that the field has a value on submit since there is no concept of a radio "list" right now with built-in validation.

Thanks for the info Brian. I might just go for a default radio button.