Copy link to clipboard
Copied
I have a form that I want to print sequential invoice numbers. Example: Invoice Number 601541 prints, then Invoice Number 601542 prints, and so on. I want to be able to just click the amount of copies and have it print like that. Any javascript suggestions?
Copy link to clipboard
Copied
It's possible, but would require a separate print command for each copy.
Let's say the field is called "Invoice". You run print the file like this 10 times with different values for it in each copy:
for (var i=1; i<=10; i++) {
this.getField("Invoice").value = Number(this.getField("Invoice").value)+1;
this.print({bSilent: true});
}
Copy link to clipboard
Copied
Separate print command? I can't just type in the number of copies and it print sequential numbers, like in excel?
And where does this code go? under document javascript or document actions?
Copy link to clipboard
Copied
No, you can't.
Depends on how you want to execute it. A button or from the JS-console would be the best options.