How to Keep a PDF Form Submission Date from Updating
Question details
The user wants to prevent the auto-generated date and time on a PDF form from refreshing after the form has been submitted and reopened by the recipient.

- Product
- Device & OS
- not provided
- Scenario
- Submitting a completed PDF form that contains an automatic document-level date and time script.
- Observed behavior
- The date and time script executes again when the submitted PDF file is opened, overriding the original submission timestamp with the current date.
Ensure you have access to the PDF's form editing tools and the underlying JavaScript code to modify document-level and button scripts.
Use a Hidden Checkbox to Freeze the Date Script
Modify your document-level script to check a hidden status field, preventing the date from refreshing once the form has been submitted.
By introducing a hidden form field that acts as a flag, you can control exactly when the date script is allowed to run. Once the form is submitted, the flag is flipped to true, permanently freezing the date in its current state.
Insert a new checkbox form field into your PDF document, name it 'Submitted', and set its appearance properties to 'Hidden'.
Locate your document-level date script. Wrap the existing code in an 'if' statement so it only updates the date and time if the 'Submitted' checkbox is unchecked.
Open the properties of your Submit button. Add a JavaScript action that sets the 'Submitted' checkbox to true immediately before the submission command executes.

Manage PDF Forms and Properties with WPS Office
WPS Office offers a comprehensive PDF editor that lets you interact with form fields, manage document settings, and handle advanced PDF tasks seamlessly.
- 1. Open your PDF: Launch WPS Office and open your interactive PDF document.
- 2. Access Form Tools: Navigate to the Form tab on the top ribbon to view and interact with various form controls.
- 3. Edit or Fill Forms: Make necessary adjustments to your text fields, checkboxes, or buttons directly within the interface.
- 4. Save the Document: Save your modified PDF to ensure all form inputs and structural changes are permanently preserved.

Frequently Asked Questions
Why does my PDF date field automatically update to today's date?
This happens when a document-level JavaScript is set to fetch the current system date and time whenever the file is opened. It requires a conditional check to stop updating once the form is marked as submitted.
Does setting a PDF form field to read-only prevent scripts from updating it?
Setting a field to read-only prevents manual typing by users, but backend JavaScript can still programmatically alter the field's value unless the script itself is restricted.
Can I permanently lock the date without using JavaScript?
Yes, you can 'flatten' the PDF document or print it to a new PDF before sharing it. Flattening removes all interactive form fields and scripts, converting the dynamic date text into standard static PDF content.




