If you are using magento form validation add class(magento-checkbox-validation) in your radio inputs(of same group):
And if you are writing your custom script then add this function in script :
if above function return true, it means your radio is selected
class="magento-checkbox-validation" OR use "validate-one-required" on the last radio/checkbox in the group
And if you are writing your custom script then add this function in script :
function validateRadioIsSelected() { var options = $$('input.Classname'); for( i in options ) { if( options[i].checked == true ) { return true; } } return false; }
if above function return true, it means your radio is selected
No comments:
Post a Comment