Copy link to clipboard
Copied
The answer I found here:
https://answers.acrobatusers.com/Help-adding-number-increment-instance-reset-button-q96703.aspx
was beyond my technical knowledge.
I'd like to know first how to create a form reset button and then have it increment the previous number on save and close.
Where/how do I add the Javascript code?
Copy link to clipboard
Copied
Reset button: Add a button with the "Reset Form" command as its Mouse Up action.
Counter field: When do you want to change its value, exactly?
The basic code to do it is:
var f = this.getField("Counter");
f.value = Number(f.value)+1;
f.defaultValue = f.value;
Copy link to clipboard
Copied
Try67,
Thanks for your response.
I'm new to Javascript in Acrobat. I composed my form in InDesign including text fields and check boxes.and added a reset button which works well. Where do I add the script in Acrobat?
Ideally I would like to increment on save or some other suggestion that would allow me to have a different record each time.
Copy link to clipboard
Copied
I would use the Will Save event. You can find it under Tools - JavaScript - Set Document Actions.
Copy link to clipboard
Copied
Is it possible to add step by step screenshots? I am sure there are others who would benefit from this.