Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

un-checking a checkbox

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?

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

un-checking a checkbox

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

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

un-checking a checkbox

Thanks, That works.

Return to “Issues”