I'm creating a .pdf form in Foxit which needs to be able to generate a random, unique number each time the form is used. I presume the use of a button with javascript embedded is my best option however have not been successful in creating this. Suggestions?
var randomNumberField = this.getField("foo");
Do you have a "foo" field to run this on and to later populate with a number?
if you do, it's as simple as:
and setting the field to be ReadOnly. code taken from here
no need for a button or anything, it runs on document load (i think?).
example pdf file (that will expire in 30 days....): https://easyupload.io/ew86ge