Until this morning I did not know it was possible to have JavaScript in a PDF, but a work colleague needs help.
She has 5 textfields defined. They are labelled £TRAVEL, £SUBSISTENCE ACCOMODATION, £TELEPHONES, £MISCELLANEOUS and £Less cash advance
4 of these fields will take number input which will be summed up and the 5th field input subtracted from the sum of the first four.
Then there is a 6th field which will display the result.
I am trying the following code:
var travel = this.getField("£TRAVEL");
var accom = this.getField("£SUBSISTENCE ACCOMODATION");
var teleph = this.getField("£TELEPHONES");
var misc = this.getField("MISCELLANEOUS");
var less = this.getField("£Less cash advance");
(travel + accom + teleph + misc) - less;
Am I on the right track and if I am, how do I assign the calculation to a 6th textfield below?
It will be something like: