I have a form fillable PDF that is located on our website. It has two buttons, a PRINT and CLEAR. I also have a text field called InvoiceNumber. What I want is every time a user clicks the button PRINT, the InvoiceNumber text field increments and stays that number.
I made it the text field to increment using the following script:
var f = this.getField("InvoiceNumber");
f.value = Number(f.value)+1;
f.defaultValue = f.value;
BUT, when someone or the same one opens it up or refreshes the page, it goes back to a blank text field, then when that person clicks print it increments again.
I am wondering if there is a way to have a text field increment after a person prints the form, close it and when it opens again the number is the next number. Is this possible?
Access connectivity is not an internet ready solution (they will need access to the DB). If you really need to do this via internet, consider using a SOAP service or manually compose a REST call to get the current invoice number.