I'm a newbie and need help.
My form is an "evaluation form" where the user selects repsonses from drop down list boxes for 12 different categories. The choices are:
Failed to meet expections
Each response has a value: 4 down to 1
I need to create a summary of how many rating were 4, how many were 3, etc.
I can count the frist category with an "if " statement but I can not count any of the remaining 11 categories.
How should I do this?
You will need to set up hidden fields to old the values.
If you have a submit/save button place the script behind the click event of that button.
If you want to calculate as the user selects from the drop down then put the script on the calculate event of the hidden field.
var total1 = 0;
var total2 = 0;
var total3 = 0;
var total4 = 0;
if (dropdown1.rawValue == "1")
total1 = total1 + 1;
else if (dropdown1.rawValue == "2")
total2 = total2 + 1;
else if (dropdown1.rawValue == "3")
total3 = total3 + 1;
total4 = total4 + 1;
//"the script above shoudl be repated for all dropdown lists"
hiddenfieldTotal1.rawValue = total1;
hiddenfieldTotal2.rawValue = total2;
hiddenfieldTotal3.rawValue = total3;
hiddenfieldTotal4.rawValue = total4.