Hi,
I need to have a field in a form that sums the data entered by the user in 5 other fields, and one defined field. It's super easy to do in Acrobat 9.0, but I need to create the form in LiveCycle and the JavaScript wont transfer from Acrobat to Livecycle. Here is what I have and it isn't working:
AFSimple_Calculate("SUM", new Array ("LineCalc1", "LineCalc2", "LineCalc3", "LineCalc4", "LineCalc5", "StudentLoan"));
A separate field needs to subtract the value from that calculation from 30,400:
event.value = ( 30400 -
this.getField("Total_Proposed_Payment_Toward_Tuition_Room_and_Board").value )
I am a complete beginner at JavaScript. I have tried to figure this out, but I really just don't know where to go! Please help! Thank you.
Solved! Go to Solution.
Views
Replies
Total Likes
FormCalc uses a simple Excel-like syntax for mathematical operations. Something like this is possible...
// form1.page1.subform1.Total::calculate - (FormCalc, client)
$.rawValue = 30400 - (LineCalc1 + LineCalc2 + LineCalc3 + LineCalc4 + LineCalc5 - StudentLoan)
Steve
You are using Acrobat Form Tool code, so unless you are making your form with Acrobat, I would use the syntax and languages of LiveCycle Designer.
Look in the scripting reference for the 'Sum' function and examples of how to write equations in LiveCycle Designer. The 'Scripting Reference' is under LiveCycle Designer's "Help" menu option.
FormCalc uses a simple Excel-like syntax for mathematical operations. Something like this is possible...
// form1.page1.subform1.Total::calculate - (FormCalc, client)
$.rawValue = 30400 - (LineCalc1 + LineCalc2 + LineCalc3 + LineCalc4 + LineCalc5 - StudentLoan)
Steve
Thank you Steve!
Views
Replies
Total Likes