Is that grid generated by the service mapping, or you have created it manually?
Is that grid generated by the service mapping, or you have created it manually?
It is set by mapping.
Please use the similar JS code to https://getsatisfaction.com/apperyio/...
You just need to make a loop through grids, not inputs
Thank you for the advice. In doing that with the code below, I don't get each individual value.
prevar checkboxValues = [];
$("[name=mobilegrid_889 ]").each(function(){
var C = Apperyio("mobiletextinput_896").val();
var B = Apperyio("mobilelabel_895").text();
checkboxValues.push({C:C, B:B});
});
localStorage.setItem("arr", JSON.stringify(checkboxValues));/pre
It just returns 3 instead of two and each of them should be different instead of how they are all the same in this screenshot..
Just change:
prevar C = Apperyio("mobiletextinput_896").val();
var B = Apperyio("mobilelabel_895").text();/pre
to:
prevar C = $(this).find("[name=mobiletextinput_896]").val();
var B = $(this).find("[name=mobilelabel_895]").text();/pre
Yes, this is a template object which is used in the mapping process.
Please ignore the last item here or check it before reading the values.
prevar checkboxValues = [];
$("[name=mobilegrid_889 ]").each(function(){
if (!$(this).parent().attr("data-appery-tpl")){
var C = Apperyio("mobiletextinput_896").val();
var B = Apperyio("mobilelabel_895").text();
checkboxValues.push({C:C, B:B});
}
});
localStorage.setItem("arr", JSON.stringify(checkboxValues));/pre
So if I have it saved in local storage in the way you have outlined above, how do I get just the "B" values back through mapping? Right now, whatever I do only gives me the first value rather than all of the values stored.
And this is the code I am using with the mapping:
prevar arrayJS = value.C;
console.log("arrayJS = ", arrayJS);
var arrayJSON = JSON.stringify(arrayJS);
console.log("arrayJSON = ", arrayJSON);
return arrayJSON;/pre
The console shows my result. It only gets the first item rather than an "a, b, and c".
Any ideas on how to get everything??