I've created a couple of fieldsets with mandatory radio select lists in them, the 1st with 3 choices, the 2nd w/ 2, e.g.:
- 0=>Tons
- 1=>Cubic Feet
- 2=>Linear Feet
and
- 0=>No
- 1=>Yes
I left the default value field blank when creating these, but the 0 index option is checked, nevertheless, causing the form to pass validation even though the user hasn't chosen an option. Is this a bug?
Comments
Comment #1
Anonymous (not verified) commentedUpdate — sorry, I meant to say I didn't check any of the radio inputs when creating the form (there is no 'default value' field in this particular dialog).
Comment #2
robertom commentedif I've understood what you mean I don't think that this is a bug, this is a normal behavior of radio button
I quote part of http://www.w3.org/TR/html401/interact/forms.html#radio
Comment #3
Anonymous (not verified) commentedYou're right, of course. I'll have to include a default "Choose One" button & use JavaScript & some custom PHP to ensure that the user checks one of the non-default buttons.
Comment #4
Anonymous (not verified) commentedOK, I'm not sure if it's because I applied this patch,, or because I got added custom index => key values (changed index 0 to a human-friendly key), but now I can create radio groups w/o a default checked button.
Comment #5
Anonymous (not verified) commented