Timeline for Initially unchecked radio boxes in a form on load
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 3, 2012 at 13:28 | comment | added | Andreas W. Wylach | OK, your comment makes sense, they supposed to have a value. I'll leave them checked as with their default. Al other is a bit hacky ... Upvoted your comment! | |
Jul 3, 2012 at 13:24 | comment | added | JurgenR | I guess this will allways cause problems because ideally, radiobuttons are supposed to have a value. Maybe it's not the cleanest but another solution could be to clear the radio elements using a javascript function on window onload. function clear_form_elements(ele){$('ele').find(':input').each(function() { case 'radio': $(this).attr('checked', false);} | |
Jul 3, 2012 at 12:11 | comment | added | Andreas W. Wylach | Looks good, but now the validation does not take effect, and does not warn if nothing was checked, because the default value is present as FALSE or 0 ... have no clue how to catch this one in the _validate handler ... | |
Jul 3, 2012 at 12:02 | history | answered | JurgenR | CC BY-SA 3.0 |