Hi, I have created a button to spawn new pages based on the template page in a PDF form. and in the template page, there is a field to generate sequential number everytime I spawn a new page, the trouble is every time I saved it and reopen it, the number goes up by "1", which messed up the whole document, so how am I able to set a condition to it to stop it updating every time I save it and reopen it. Does anyone have a clue to it please? Thanks very much.
The scripts I used for both spawning page and sequential numbering are here:
var num = this.getField("task no 1");
num.value = Number(num.value)+1;
num.defaultValue = num.value;
Instead of doing it like that you should use the page property of each field, like this:
event.value = (event.target.page+1);
Then run the calcuateNow command after spawning the pages, and it should be fine.