How to make it so only the checked items save to local storage not all the check box items?
Hello Peter,
Please clarify, how do you save them now? This link might help:
https://getsatisfaction.com/apperyio/...
Well I only want the checked items to be sent to the next page of my app. But when you check off one of the items all of the items get saved to local storage and sent to the 2nd page like this. I only want the checked off items to be sent to the 2nd page.
Hi Peter,
Here is how to save selected values of mobilecheckboxgroup named 'mobilecheckboxgroupName':
prevar mobilecheckboxgroup = Apperyio("mobilecheckboxgroupName").find(":checked");
var arr = [];
mobilecheckboxgroup.each(function(){
arr.push($(arr).val());
});
localStorage.setItem("arr", arr);/pre
How do I use that code?
Peter,
You would need to run it before navigating to the second page.
is it javascript or CSS?
Peter,
JavaScript. Use an appropriate event action to run it.
it did not work.