As to the second - we'll figure out and update.
As to the second - we'll figure out and update.
You mean this method here?
var short_name = localStorage.getItem("short_name");
if (!short_name) {
// we have new item, so we get short_name as first value
// next value will be Name
localStorage.setItem("short_name", value);
return value;
} else {
// we already processed short_name
// next value will be short name for new item, so do cleaning
localStorage.setItem("short_name", '');
return short_name + ' - ' + value;
}
Sorry, what are you referring to as 'second' above?
If I am meant to use the code above, am a bit confused as to whether I need to set a local storage variable first? Also am a bit confused about what short_name and value refers to above.
Anychance, you could give me a code example using my variables please?
Sorry, yes, I'm talking about this post https://getsatisfaction.com/apperyio/...
Just use that code without changes.
You need to add JS on Response (checkboxItem):
codevar short_name = localStorage.getItem("short_name");
if (!short_name) {
// we have new item, so we get short_name as first value
// next value will be Name
localStorage.setItem("short_name", value);
return value;
} else {
// we already processed short_name
// next value will be short name for new item, so do cleaning
localStorage.setItem("short_name", '');
return short_name + ' - ' + value;
}/code
And connect ItemName and Text in checkboxlabel as well.
"without changes"
Isn't the short_name and name variable referring to the fields that the original problem was referring to? As in, they wanted to display a shortname and name in one field.
My variable names are different (ItemName and carbonUnits), so how would the above code work in my instance?
Yeap, just did that.
I only get the itemName though, no carbonUnits beside it.
Do you have carbonUnits mapped?
No, "short_name" it's function, variable it's value
Currently, I have tried mapping carbonUnits to text in checkboxlabel along with ItemName. In that case, the name gets overwritten and only the carbonUnits are displayed.