How to Spawn a Blank PDF Template Without Copying Field Values
Question details
The user needs to spawn a new PDF template page via a button where the newly created page features completely blank form fields, instead of copying the input values from the original sheet.

- Product
- Device & OS
- not provided
- Scenario
- Creating a new PDF form page using a template spawning button.
- Observed behavior
- The new page is successfully created, but it actively copies the user's previously entered answers from the original template's form fields.
Ensure you have access to the PDF's form editing or JavaScript modes, and verify you have saved a backup of your current interactive PDF form before modifying the underlying template structures.
Use a Hidden, Empty Template for Spawning
Create a separate, hidden version of your template that contains no field values to ensure spawned pages are completely blank.
When a template is spawned based on a visible, active form page, it replicates both the field structure and the currently entered data. To bypass this, you need a pristine, hidden template.
Duplicate your current working page structure, clear all form field data, and designate it as a new template (for example, name it 'Property_Blank').
Access the page properties of this new empty template and set it to be hidden, so it does not interfere with the regular document flow.
Modify the JavaScript action on your trigger button to call getTemplate('Property_Blank') instead of targeting the original, populated template.
Click the button to test the script. It will spawn the hidden empty template, generating a new sheet with an identical structure but entirely blank form fields.
Easily Manage and Edit PDF Forms with WPS Office
If you need a straightforward way to edit, manage, and merge PDF forms without complex JavaScript configurations, WPS Office provides an intuitive PDF editor designed to streamline your workflow.
- 1. Open your PDF file: Launch WPS Office, select the 'PDF Edit' tool from the home screen, and open your PDF form document.
- 2. Navigate to Page Management: Click on the 'Page' tab located in the top ribbon menu to view and manage all the pages in your document.
- 3. Insert a blank form template: Select the 'Insert Page' option and choose 'From File' to import a blank, pre-saved PDF form template directly into your current workspace.
- 4. Adjust Form elements: Switch to the 'Form' tab to manually add, edit, or remove interactive text fields and checkboxes as needed.

Frequently Asked Questions
Why do my spawned PDF pages copy the existing data?
If you spawn a page from an active, visible template where data has already been entered, the duplication process captures both the field elements and their current input values. A hidden, empty template is required to prevent this.
How do I create a hidden template in a PDF editor?
Typically, you navigate to the organize pages tool, select the target page, access its 'Page Properties', and check the option to define it as a hidden template. This hides the page from standard viewing while keeping it available for scripts.
Can I clear the form fields automatically after spawning instead of modifying the template?
Yes, you can write a subsequent JavaScript function to iterate through the newly instantiated form fields and reset their values. However, using a pre-configured hidden empty template is generally much more efficient and less prone to script errors.




