I have created a form and would like to count the number of checkboxes in each that have been selected.
However, I am not a programmer and totally confused. I have reviewed all the information I can find on these forums relating to this. I have also searched on line for a example I could use. If you anyone could help me I would greatly appreciate it.
Thanks much.
Views
Replies
Total Likes
Views
Replies
Total Likes
Thanks Niall,
I'll give it a try.
Penny
Views
Replies
Total Likes
Niall,
I must be making progress in understanding how this stuff works, because I could understand your example. However, I could not translate it for my form. I think the problem may be the checkboxes I am wanting to count are set up as columns in a table and I need to count the checkboxes in each column. So if you have any other suggestions I would appreciate the help.
Thanks again,
Penny
Views
Replies
Total Likes
Hi Penny,
Is the Table static (eg, the user cannot add additional rows) or is it dynamic (where the user can add more rows/checkboxes)?
Niall
Views
Replies
Total Likes
Hi Niall,
The table is a static table. Thanks for your help.
Penny
Sent from my iPad
Views
Replies
Total Likes
Hi,
Have a look at htis example that shows how to reference objects in the form. It has both JavaScript and FormCalc examples and include summing tables: http://assure.ly/kUP02y.
As you know checkboxes has a default value of 1 for on and 0 for off. If uour rows have the same name (eg Row1), then the following FormCalc in the total object would work:
$ = Sum(Table1.Row1[*].CheckBox)
This uses the wildcard to go through all of the instances of Row1. If your table or objects are named differently these will need to be reflected in the script.
If your rows are named differently then you will need to reference them one at a time. Again using FormCalc:
$ = Row1.CheckBox + Row2.CheckBox + Row3.CheckBox + Row4.CheckBox
Hope that helps,
Niall
Views
Replies
Total Likes
Thank you...thank you! This worked.... I did not the it could be as easy as this.
You rock! I really appreciated your time and help.
Penny
Sent from my iPad
Views
Replies
Total Likes
Views
Likes
Replies