Counting Checkbox selections?
Hi,
I'm trying to count the checkbox selections in a form and then use the result to calculate a currency amount and populate another field with that amount.
I have a checkbox list and in its On User Input event I have:
NumSigs=0;
for each r in Members
{
NumSigs=(NumSigs + 1);
}
input.Total=(input.SIG_Fee * NumSigs);
This works a little, meaning intermittently, but not consistently. When I put an alert on the NumSigs=(NumSigs+1); line, I consistently got an alert that said NumSigs was "1," "2," and "3" no matter how many checkboxes I selected (there are six on my form.
Can anybody give me any advice on this. I would love to use "count" but it appears it's just an SQL function, not a Deluge function for use on forms. Thanks.
Mark