It took a while for me to work with the support team and understand how to get my points for checked boxes to calculate. I now need to know how to add a number that is in a field to these checkbox calculations. Currently I have what's in blue below and am wondering if I would just add the red part to make this work.
$chbox = $data['gromsterz___select_badges_raw'];
$chbox_count = 0;
if (!empty($chbox)) {
if (!is_array($chbox)) {
$chbox = json_decode($chbox);
}
$chbox_count1 = count($chbox);
}
$chbox = $data['gromsterz___trick_badges_raw'];
$chbox_count = 0;
if (!empty($chbox)) {
if (!is_array($chbox)) {
$chbox = json_decode($chbox);
}
$chbox_count2 = count($chbox);
}
$field = $data['gromsterz___bonus_points_raw'];
$field_count = 0;
if (!empty($field)) {
if (!is_array($field)) {
$field = json_decode($field);
}
$field_count1 = count($field);
}
return $chbox_count1 * 25 + $chbox_count2 * 100 + $field;
I think I have something coded wrong in the red part.
Thanks,
Anna
$chbox = $data['gromsterz___select_badges_raw'];
$chbox_count = 0;
if (!empty($chbox)) {
if (!is_array($chbox)) {
$chbox = json_decode($chbox);
}
$chbox_count1 = count($chbox);
}
$chbox = $data['gromsterz___trick_badges_raw'];
$chbox_count = 0;
if (!empty($chbox)) {
if (!is_array($chbox)) {
$chbox = json_decode($chbox);
}
$chbox_count2 = count($chbox);
}
$field = $data['gromsterz___bonus_points_raw'];
$field_count = 0;
if (!empty($field)) {
if (!is_array($field)) {
$field = json_decode($field);
}
$field_count1 = count($field);
}
return $chbox_count1 * 25 + $chbox_count2 * 100 + $field;
I think I have something coded wrong in the red part.
Thanks,
Anna