Other PDF Issues

How to Add a Time Limit to a Fillable PDF Form

Chanuka GeekiyanageChanuka Geekiyanage Nov 3, 2026 870 views

Question details

A teacher wants to know if a fillable PDF assessment can be configured to automatically lock or expire exactly one hour after a student opens it remotely.

Can You Add a One-Hour Time Limit to a Fillable PDF Form?
Product
PDF
Device & OS
not provided
Scenario
Creating a remote PDF assessment where students are given a strict time constraint to complete the document.
Observed behavior
Needs a mechanism to enforce a strict one-hour completion time limit on a standalone fillable PDF file.
Before you start

Before attempting to add a time limit to a local PDF file, consider that standalone PDFs are inherently difficult to secure against tampering if the user has full control of their own device.

Solution 1Recommended

Use JavaScript to Lock Fields After a Specified Time

You can embed custom document-level JavaScript in advanced PDF editors to record the opening time and lock form fields after 60 minutes.

While the PDF format does not have a native 'self-destruct' timer, you can add custom JavaScript to track elapsed time. When the document is opened, the script records the start time, and a countdown script periodically checks the elapsed time. Once the one-hour mark is reached, the script changes all fillable fields to 'read-only'.

However, this method is fundamentally insecure. Students can easily bypass it by disabling JavaScript in their PDF reader, using a basic PDF viewer that doesn't support scripts, or changing their computer's system clock.

1
Open PDF in an Advanced Editor

Open your fillable PDF form in an advanced PDF editor that supports document-level JavaScript authoring.

2
Add Document JavaScript

Navigate to the JavaScript or Form settings and create a new Document Action triggered when the file is opened.

3
Write the Timer Script

Insert a custom script that captures the current time using 'new Date()' and sets a timeout (using 'app.setTimeOut') to loop through all form fields and set their 'readonly' property to true after 3600000 milliseconds.

4
Save and Distribute

Save the PDF and send it to your students. You must explicitly advise them to use a compatible PDF reader with JavaScript enabled, otherwise the timer will not function.

Use JavaScript to Lock Fields After a Specified Time
Security Warning: This method relies entirely on client-side JavaScript. It is not suitable for high-stakes exams because the restrictions can be bypassed easily by tech-savvy users.

Create and Manage Fillable PDFs with WPS Office

WPS Office provides a comprehensive PDF toolkit to easily create, edit, and manage PDF forms. While high-stakes timed exams are best handled by dedicated online platforms, WPS Office is perfect for designing the assessment layouts, managing form fields, and converting your existing documents.

  1. 1. Open your Document: Launch WPS Office and open your existing PDF or a blank document to start designing your assessment.
  2. 2. Access Form Tools: Navigate to the 'Form' tab in the top ribbon to access various fillable field options.
  3. 3. Insert Form Fields: Click to add text fields, check boxes, or radio buttons where students need to input their answers.
  4. 4. Save as PDF: Once your assessment layout is complete, save the file as a PDF document ready for distribution.
Easily insert text fields, checkboxes, and interactive buttons into your PDFs.Fully compatible with standard Adobe Acrobat PDF fillable forms.Lightweight and fast, ideal for students opening study materials and assessments remotely.Seamlessly convert Word documents into fillable PDF forms with a few clicks.
microsoft office alternative - wps office

Frequently Asked Questions

Can I password-protect a PDF to expire after a certain calendar date?

Yes, advanced PDF DRM (Digital Rights Management) tools can set a document to expire on a specific calendar date. However, setting a countdown timer that starts exactly from the moment of opening requires custom JavaScript or specialized DRM software.

Will a JavaScript time limit work on mobile PDF readers?

Often, no. Many mobile PDF viewers, default web browser PDF plugins, and basic reader apps do not support advanced JavaScript or form scripts. If a student uses one of these, the timer script will simply not execute, and the fields will never lock.

How can I prevent students from copying or editing the PDF assessment?

You can use PDF editing software to set permission passwords, restricting unauthorized copying, printing, and editing. However, for remote testing scenarios, dedicated testing platforms always offer much better security against cheating than a standalone file.