PDF Editing Issues

Stop an Acrobat Form Date Field from Updating Automatically

Muhammad TalhaMuhammad Talha Nov 19, 2026 868 views

Question details

Keep a PDF form date field from being overwritten each time the document opens.

Stop an Acrobat Form Date Field from Updating Automatically
Product
Adobe Acrobat PDF forms
Device & OS
not provided
Scenario
A document-level JavaScript fills a date field with the current date when the PDF opens.
Observed behavior
The date changes on subsequent openings instead of preserving the original saved value.
Before you start

Open the PDF in a version of Adobe Acrobat that can edit document JavaScript, and identify the exact name of the date field. Check that JavaScript is enabled in Acrobat's preferences before testing the script.

Solution 1Recommended

Change the Acrobat script to fill only an empty date field

Use this method when a document-level script overwrites the date each time the PDF opens.

1
Find the document script

Open the PDF in Adobe Acrobat. Go to All tools > Use JavaScript > Document JavaScripts, or use Tools > JavaScript > Document JavaScripts in older versions.

2
Edit the date assignment

Select the script that sets the date and click Edit. Replace the unconditional assignment with: if (this.getField("Today").valueAsString == "") this.getField("Today").value = util.printd("mm/dd/yyyy", new Date());

3
Check the field name

In Prepare a form, select the date field and check its name in Properties. If it is not Today, replace both instances of "Today" in the script with the exact field name.

4
Save and test the PDF

Save the script and PDF, then close and reopen the file. An empty field should receive the current date; after you save and reopen it again, the date should remain unchanged.

Change the Acrobat script to fill only an empty date field
Existing dates and other scripts: The condition preserves whatever value is already in the field, even if it was previously overwritten. Correct an existing date manually if needed, and check for field actions or other scripts if the date still changes.
Fill PDF forms in WPS Office

Enter and save a fixed PDF form date in WPS Office

For a form without an automatic date script, use WPS Office to enter a date manually and save the completed PDF. If an Acrobat script is overwriting the field, change it in Acrobat first; filling the field in WPS does not remove that script.

  1. 1. Open the PDF: Open WPS Office and select Open to choose the PDF form.
  2. 2. Enter the date: Click the fillable date field and type the date in the format requested by the form.
  3. 3. Save the form: Choose Save As and save the completed PDF under a new name.
  4. 4. Verify the date: Close and reopen the saved PDF in WPS Office to check that the date remains in the field.
Enter a fixed date in a fillable PDF formOpen and work with PDF documentsCompatible with Microsoft Office formats such as DOCX and XLSX
QA img-9

Frequently Asked Questions

Why does my PDF form date change when I reopen it?

A document-level JavaScript may assign the current date every time the PDF opens. In Acrobat, check Document JavaScripts for an assignment to the date field.

What if my date field is not named Today?

Open Prepare a form in Acrobat and check the field name in its Properties. Replace both instances of "Today" in the conditional script with that exact name.

Will the script restore the original date automatically?

No. It preserves the value currently in the field. If the original date was already overwritten, enter the correct date manually and save the PDF.

Can I make the script change in Acrobat Reader?

Editing document-level JavaScript generally requires Adobe Acrobat rather than the free Acrobat Reader. Open the PDF in Acrobat and use the Document JavaScripts tool.

What if the date still changes after I edit the script?

Check the field's actions and any other document or calculation scripts in Acrobat for additional assignments to the same field. Also confirm that you saved the edited PDF.