PDF Editing Issues

How to Reset Only One Page in a Multi-Page PDF Form

Steven ParkerSteven Parker Nov 5, 2026 869 views

Question details

The user wants to create a reset button that clears form fields on a specific page of a multi-page PDF form without having to list dozens of field names manually.

How to Reset Only One Page in a Multi-Page PDF Form
Product
PDF Form Editor
Device & OS
not provided
Scenario
Managing a complex, multi-page PDF form where users need to clear data on the current page without affecting the rest of the document.
Observed behavior
The standard reset function clears the entire document, requiring an automated way to target and reset only the fields located on a specific page index.
Before you start

Ensure your PDF form is fully created and all field names are finalized. You will need access to the JavaScript editor in your PDF application to implement this automated reset function.

Solution 1Recommended

Use Document-Level JavaScript to Target Specific Pages

Create a custom JavaScript function that loops through all form fields, identifies which ones belong to the target page, and resets only those fields.

Instead of manually selecting dozens of fields in the button properties, you can use a document-level script. This automated loop checks the page index of every field in the PDF. It gathers the names of fields located on your chosen page into an array and passes that array to the resetForm function.

1
Open the JavaScript Editor

Open your PDF editor, navigate to the Tools menu, and access the Document-Level JavaScripts section.

2
Create the Custom Function

Add a new script and define a function, for example, 'function resetPageFields(pageNum)'. Inside this function, create an empty array to store the target field names.

3
Loop Through the Form Fields

Write a 'for' loop using 'this.numFields' to iterate through all fields. Use 'this.getNthFieldName(i)' to get each field's name.

4
Filter by Page Index

Inside the loop, retrieve the field object and check its 'page' property. If the property matches your 'pageNum' variable, push the field name into your array.

5
Execute the Reset

After the loop finishes, call 'this.resetForm(fieldArray)' to clear only the collected fields.

6
Assign the Script to a Button

Add a 'Reset' button to your target page. Under the button's Action properties, choose 'Run a JavaScript' and enter 'resetPageFields(0);' (use the correct page index).

Use Document-Level JavaScript to Target Specific Pages
Understanding Page Indexes: PDF page indexes always start at 0. Therefore, the first page is 0, the second page is 1, the third page is 2, and so on. Make sure to test fields with multiple widgets and exclude any fields that should not be reset.
Efficient PDF Form Editing

Manage and Edit PDF Forms Easily with WPS Office

WPS Office provides a comprehensive PDF editor that allows you to view, fill, and manage interactive PDF forms effortlessly. Whether you need to reset form fields, add new text, or convert documents, WPS PDF handles it all seamlessly while offering broad format compatibility.

  1. 1. Download and Install WPS Office: Download WPS Office from the official website and open the WPS PDF application.
  2. 2. Open Your PDF Form: Click 'Open' to load your multi-page interactive PDF form into the workspace.
  3. 3. Fill and Manage Fields: Navigate to the Form tab to interact with text fields, checkboxes, and buttons. You can easily clear or fill data as needed.
  4. 4. Save and Export: Once your form adjustments are complete, click 'Save' or export the document to share it securely.
Easily view and fill interactive PDF formsHigh compatibility with standard PDF documents and Adobe Acrobat formatsLightweight application with a user-friendly interfaceFree basic PDF editing, merging, and viewing tools
QA img-9

Frequently Asked Questions

Why does my reset button clear the entire PDF form instead of one page?

By default, the standard 'Reset a form' action clears all interactive fields within the entire document. To restrict the reset action to a single page, you must either specify the exact fields manually in the button properties or use a custom JavaScript function to target a specific page index.

Can I reset specific fields without using JavaScript?

Yes, you can use the standard 'Reset a form' action in the button properties and manually check the boxes next to the specific fields you want to clear. However, this method can be tedious and prone to errors for forms containing dozens of fields.

What happens if a form field spans across multiple pages?

If a field widget appears on multiple pages (meaning the fields share the exact same name), resetting it from any page will clear its value across all pages. The data is tied to the field name, not just the physical location of the widget.