Get checkbox value
Hi,
The checkbox I have is a loop link to the database, which has multiple rows base on the database. I know to get a single checkbox value I can simple use this "Apperyio("checkbox").find('input[type="checkbox"]').val() " but what I have now is a loop.
I have tried this:
var name_arr = [];
checkboxgroup = $('[name="checkboxgroup"]');
for (var i = 0; i < checkboxgroup.length-1; i++) {
name_arr = {"name":Apperyio("checkbox").find('input[type="checkbox"]').val() , "value":Apperyio("checkbox").find('input[type="checkbox"]').val()};
}
Apperyio.storage.nameArray.set(name_arr);
But what I get is only the first checkbox value. How can I get the rest of the checkbox value?
Thanks!