I'm lost here, I use LiveCycle Designer ES and I'm trying to fix few fields to interact with each other in pdf. I've studied few examples, calculation field has marked in value tab "Calculated - Read Only" and code is added in Script editor (Ctrl+Shift+F5)
What I am trying to do is add two numbers inserted by user and display score in third field. I've created 3 "Numeric Fields" named:
NumericField1
NumericField2
NumericField3
last ones value is set to "Calculated- Read Only".
I mark last field and go to script editor (ctrl+shift+f5 or window->script editor)
there I set language for Java Script (which is enabled btw) and I put either seen in some AA9pro examples (like holidays chart)
Sum(NumericField1, NumericField2);
or seen in adobe javascript tutorial
var f = this.getField("NumericField1");
var g = this.getField("NumericField2");
event.value = f.value + g.value; //or NumericField3 instead of event.value
none of these couses any errors in syntax checker and none of this works. What do I do wrong?
Please advice.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Let Val1 , val2, Val3 are three Numeric fields fields .
then script Editor ,
In Javascript ,
val3.rawValue = val1.rawValue + val2.rawValuwe ;
thats it . Try Good Luck .
Views
Replies
Total Likes
Hi
Let Val1 , val2, Val3 are three Numeric fields fields .
then script Editor ,
In Javascript ,
val3.rawValue = val1.rawValue + val2.rawValuwe ;
thats it . Try Good Luck .
Views
Replies
Total Likes
Since you set the 3rd Numeric field value to Calculated-Read Only, then you should place your code in the Calculate event of the 3rd Numeric field.
Try placing the below line of code in the Calculate event and set the language to FormCalc instead of Java script in the Script window. (Sum is a function supported in FormCalc).
Sum(NumericField1, NumericField2);
Thanks
Srini
both answers are correct, thank you.
Views
Replies
Total Likes