Copy link to clipboard
Copied
I have created a fill-able form in which i want to have the Work Order "WO" field generate a sequential number when I open the master form. When I save and close the form I want the number to remain the same and and generate a new number. I am using Adobe Acrobat Pro DC..
Select 'javascript' tool and then 'document javascript' or while in 'prepare form'tool press 'shift+d'
add new script and replace any code already in when you open window with this code:
var num = this.getField("Text1");
num.value = Number(num.value)+1;
num.defaultValue = num.value;
Change field name in code to the name of your field.
Copy link to clipboard
Copied
Hi Jimf,
As per the description above, you want to add a Work order which can generate a sequential number, Is that correct?
Please refer to the following links:
How to create sequential number field? Link: https://forums.adobe.com/thread/1337419
Adobe Acrobat 11.0.4: How do I add a sequential number generator into a text field? (PDF Forms JavaS... Link: https://answers.acrobatusers.com/Adobe-Acrobat-11-0-4-How-do-I-add-a-sequential-number-generator-int...
How do I create a form that will auto-generate a sequential form number for each instance? (PDF Form... Link: https://answers.acrobatusers.com/How-do-I-create-a-form-that-will-auto-generate-a-sequential-form-nu...
Hope this helps.
Regards,
Anand Sri.
Copy link to clipboard
Copied
The links are not working for me, I get 404 Not Found error.
Copy link to clipboard
Copied
Select 'javascript' tool and then 'document javascript' or while in 'prepare form'tool press 'shift+d'
add new script and replace any code already in when you open window with this code:
var num = this.getField("Text1");
num.value = Number(num.value)+1;
num.defaultValue = num.value;
Change field name in code to the name of your field.
Copy link to clipboard
Copied
It gives me an error message: syntaxError: missing (before formal parameters 1: at line 2
Is there something I have to setup before adding this script to the pdf?
Copy link to clipboard
Copied
Hetal0D45, please go to your PDF and copy/paste here the exact code you currently have.
Copy link to clipboard
Copied
I don't have any right now. Nothing has worked for me so far.
Copy link to clipboard
Copied
Yes, but you had some when you got the error message. As a programmer, you need to give both the source code AND the error message, at the same time. Telling us "nothing works" doesn't help us to help you; you are the programmer.
Copy link to clipboard
Copied
No I am not a programmer, but I tried the following script that is already in this thread from Nesa Nurani:
var num = this.getField("Text1"); num.value = Number(num.value)+1; num.defaultValue = num.value;
I am just an Adobe user that is trying to create sequential forms in Adobe Acrobat Pro DC. I have tried for months to get help from Adobe Help line, but after many hours and months of being transferred from one agent to another, finally decided to search the web to see if someone else has a solution to my issues.
Copy link to clipboard
Copied
I got it to work. Thank you.