Please Log in or Create an account to join the conversation.
You have to use CB Query Field or CB Code Field to either query for them and use SQL to add them up or use PHP to add up the substitutions. Example code as follows for a Code field.I have a Check Box (Multiple) field. The check boxes have numerical values. How do I add them up when checked in user profile?
No idea, we have nothing that does this. You'd have to of have configured something to change the value of the field (e.g. CB Auto Actions). I am unable to confirm on 2 local installs or our demo site.I have a Check Box (Multiple) field. When I check one or boxes and save, all boxes are checked . What is causing this?
Please Log in or Create an account to join the conversation.
I have a Check Box (Multiple) field. When I check one or boxes and save, all boxes are checked . What is causing this?
No idea, we have nothing that does this. You'd have to of have configured something to change the value of the field (e.g. CB Auto Actions). I am unable to confirm on 2 local installs or our demo site.
return (int) '[cb_checkbox1]' + (int) '[cb_checkbox2]' + (int) '[cb_checkbox3]';
Please Log in or Create an account to join the conversation.
You set all of their database values to be the same so of course that's going to happen. Value is used for database storage and needs to be unique. This is noted in the parameters description.Well I found something interesting out. Because I have assigned the same value (5) to my checkboxes, checking one checks all of them on save. What is that? Happening at 2 demo sites.
You'd need to explode the value then add the results all together. Multicheckbox and multselect fieldtypes store values with a |*| delimiter so they're stored as 5|*|6|*|7, etc.. You'd PHP explode by |*|, loop the array, and add the values. Example as follows.Is this formula for summing the checkbox values in a single multi checkbox field? That is what I want to achieve. So in my example if choice1 and choice2 are checked for a given user, the total is 5 + 5 = 10.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.