Page 1 of 1

un-checking a checkbox

Posted: Mon Oct 20, 2014 6:07 pm
by Terry Gilliver

I have a checkbox group with two checkboxes. The possible valid values are either both unchecked or any one checked, but not both. Itried the following in the checkbox groups value change event:

var value = $(this).val();
console.log(value);
if (value === 'type_1') {
Apperyio('type2_checkbox').prop('checked', false);
} else {
Apperyio('type1_checkbox').prop('checked', false);
}

This was supposed to uncheck the other checkbox, but it doesn't work for some reason. Any ideas?


un-checking a checkbox

Posted: Tue Oct 21, 2014 12:32 am
by obullei

Hello!

Please replace
codeApperyio ('type2_checkbox'). Prop ('checked', false);
on
$ ("[name = type2_checkbox] input"). prop ("checked", false);
$ ("[name = type2_checkbox] input"). refresh ();/code

For other checkboxes plaese do the same


un-checking a checkbox

Posted: Tue Oct 21, 2014 9:31 am
by Terry Gilliver

Thanks, That works.