Expand my Community achievements bar.

New to Livecycle: Need to create simple sum script

Avatar

Former Community Member
I have a form which has 4 fields ("rent", "deposit", "tax", "cleaning")that need to be calculated into a total and then populated into a "Total" field. I had originally created the form in Acrobat and had no problem with the total calculation, but when I moved it over to Livecycle it will no longer work.

Can someone tell me the correct format for creating a javascript or formcalc to complete this function?



Currently the script line is showing as



/*AFSimple_Calculate("SUM", new Array("rent", "deposit", "tax", "cleaning"));*/
1 Reply

Avatar

Former Community Member
If you use Javascript then the command would look like this:



Total.rawValue = rent.rawValue + deposit.rawValue + tax.rawValue + cleaning.rawValue;