Hi Slava,
Please follow these steps:
ol
liRemove or comment your current event handlers for these components (radiogroup and checkgroup)/li
li Select checkbox_group(don't only one item you should select whole group) and create JS event handler on "value change" event./li
li Insert the following code:
precode
//You should "mobilecheckboxgroup_16" with your checkboxgroup name.
var checkedBoxes = Appery("mobilecheckboxgroup_16").find("input:checked");
for(var i = 0; i < checkedBoxes.length; i++){
var checkedBox = jQuery(checkedBoxes);
Code: Select all
//Using current checked items. You can check it out in the browser console.
//Also you need to implement using you need.
console.log("selected [" + i + "] checkBox = " + checkedBox.val());
};/code/pre/li
liSelect radio_group (don't only one item you should select the whole group) and create JS event handler on "value change" event. http://prntscr.com/3c8qus/direct/li
liInsert the following code:
precode
//You should "mobilecheckboxgroup_16" with your radioboxgroup name.
var checkedBoxes = Appery("mobileradiogroup_12").find("input:checked");
//Note this code is needed only for analogic with checkboxes.
//Cause of only one radiobutton could be checked within one group.
for(var i = 0; i < checkedBoxes.length; i++){
var checkedBox = jQuery(checkedBoxes);
Code: Select all
//Using current checked items. You can check it out in the browser console.
//Also you need to implement using you need.
console.log("selected [" + i + "] radio = " + checkedBox.val());
};/code/pre/li
/ol
That's all. As you can see we are suggest you an equal code for the checkboxes and radiobuttons. And the way to implement is equal too.
Regards.