Disabling Javascript in new file when Save As is used
I have a PDF form that I put together that has a document number at the top. I have a javascript in the document to increment that number up by 1 every time the form is opened:
var v = +this.getField("Permit Number").valueAsString+3000;
this.getField("Permit Number").value = util.printf("%04d", (v+1-3000));
I know very little javascript and I found this example somewhere online and modified it for my own needs.
Is there a way so that when this form is filled out and Save As is used to save the filled out form that the javascript is disabled in the new file? I don't want the document number to change again if someone opens the filled out form later on.
