Showing results for 
Search instead for 
Did you mean: 

Addition of fields in Adobe forms using JavaScript or FormCalc

Former Member
0 Kudos

Hi All,

I have a few amount fields in my Adobe form. I want to calculate their sum and show it in another textfield. Any ideas how this is done using JavaScript or FormCalc.???

Thanks and Regards,


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sameer,

you cant use JavaScript here in Web Dynpro. But if you want to calculate the sum through a button click that can be done through the Action Handler method.

Suppose you have 2 fields to add whichare field1 and filed2 in the context tree and the sum will be shown in field3 of context tree - all of numeric data type - obviously. So you can do the following in the action handler method.

int sum = wdContext.currentContextElement().getField1() +