I have 25 check boxes and each box is worth 1 point.
if a user selects 5 of the boxes the result returns is "1,1,1,1,1"
I would like to see the result as 5 but what ever I do it sends out "1" unless the raw variable is displayed, then "1,1,1,1,1" is displayed.
my latest effort is below but still only results in "1"
Code: Select all
{foreach from=$fld_177 item=task name=foo}
{assign var='sum_all_foreach' value=$sum_all_foreach+$task}
{/foreach}
{assign var='result' value=$smarty.foreach.foo.total}
please help as I am going mad.