I have created a form with three numerical fields for a price list.
They have a predefined value.
price.01 = 600
price.02 = 500
price.03 = 1200
I want to create some buttons to change the values of their numerical fields.
var price = this.getField("price.01").value;
price = 750;
This code should change the value for the price.01 field to 750 but nothing happens.
The second task is very simple. Calculate the sum of the three numerical fields.
I have created a fourth field and at the calculate tab I have choosen them into the automatic function sum.
Again nothing happens.
Is there anything that I am missing?
A refresh screen function should be added?
any help would be appreciated
(using acrobat 9 pro)
Regarding the first issue: You need to access the value property directly, like so:
this.getField("price.01").value = 750;
Regarding the second issue: Are there any error messages in the JS console (Ctrl+J)? Are all the fields set up as Number fields?
thank you very much for your quick answer.
it is working well.
Second issue was also ok,