wuschel_lux
Member
Hi all,
actually I have a voting form with more checkbox elements with each 2 options. Now I want to monitor in a calc element the number of overall checked boxes.
My first attempt was to give the value = 1 to each option and run this code in the calc element:
It works, but I think it's not so elegant. Is there maybe a better way to do so?
Thanks for your support.
actually I have a voting form with more checkbox elements with each 2 options. Now I want to monitor in a calc element the number of overall checked boxes.
My first attempt was to give the value = 1 to each option and run this code in the calc element:
PHP:
$c1 = explode(",",'{...vote_c1_raw}'); $c1 = array_sum($c1);
$c2 = explode(",",'{...vote_c2_raw}'); $c2 = array_sum($c2);
....
$mySum = $c1 + $c2 .....;
Thanks for your support.