Apply Tags in Snippets
Pick List:
for (var i = 0; i < oldValue.length; i ++) {
if (newValue.indexOf(oldValue[i]) == -1) {
customer.removeTag(oldValue[i]);
}
}
for (var i = 0; i < newValue.length; i++) {
customer.addTag(newValue[i], '');
}
Radio Buttons:
if (oldValue) {
customer.removeTag(oldValue);
}
customer.addTag(newValue);