Looking for help on calcluating something in a form.
I have a table with three columns (Things, Year Purchased, Cost). The Year Purchased column has drop down list with 2010 and 2011 in it. Under the table I have two numeric fields named 2010 and 2011. When a person selects a Year Purchased and then puts a cost to it (ex Thing = socks, Year Purchased = 2010, Cost $5.00) I want the year 2010 numeric field to show the $5.00. If 2011 is selected I want the cost to go into the 2011 numeric field and finally, as more costs are inputted for either year, I want the numeric fields to keep adding them and show the sum.
Unfortunately the table can't be laid out any different than what is described. I have an example but I can't figure out how to attach it...I'm surprised I was able to turn the computer on this afternoon
Any help would be much appreciated.
It is very close. The cost field needs to be inputed by the user but what you have done for the rest of it is exactly what I am looking for. The only problem is that it won't work for me. I suspect the problem is on line 2 of the script but I don't know enough to say for sure. On my form I only have one table row and a button that allows the user to add more rows if needed. In line 2 of the script on your form it looks as though it is saying that i is equal to 0 or less than or equal to 4 (the total number of rows in your form). Do you think this is the problem?
Thanks for your help
Europe, Middle East and Africa