Computing hidden variables

Hello everyone,

I want to calculate some scores. I have 60 hidden columns which have been calculated. I used this formula below:

<input name="LSM_Q5" id="LSM_Q5" type="hidden" value = "
[% Begin Unverified Perl
my $ab=VALUE('Q5');
if($ab == 1 ){return 1;}
if($ab == 2 ){return 1;}
if($ab == 3 ){return 1;}
if($ab == 4 ){return 1;}
if($ab == 5 ){return 3;}
if($ab == 6 ){return 3;}
if($ab == 7 ){return 4;}
if($ab == 8 ){return 4;}
if($ab == 9 ){return 5;}
if($ab == 10 ){return 5;}
if($ab == 11 ){return 5;}
if($ab == 12 ){return 5;}
End Unverified %]

My question is, when i want to sum all 60 hidden columns, it could not work, empty given.
When i exported the dummy data, it gives me string variables. I think it is the problem.

How can i sum those columns?

Best Regards.

Resolved
11 replies