PDF Editing Issues

How to Hide the Original Spawn Button and Keep New Page Buttons Working in PDF Forms

Olivia MillerOlivia Miller Nov 5, 2026 869 views

Question details

The user wants to set up a dynamic PDF form so that the original page spawn button is hidden after use, while newly generated pages retain a functional spawn button.

How to Hide the Original Spawn Button and Keep New Page Buttons Working in PDF Forms
Product
PDF Forms
Device & OS
not provided
Scenario
Creating a dynamic PDF form that requires users to add unlimited pages with repeated table rows using a spawn template button.
Observed behavior
After spawning several pages, the spawn button either disappears entirely from the document or stops working across the newly created pages.
Before you start

Ensure you have a professional PDF editor with form scripting capabilities installed, and make a backup copy of your original PDF template before modifying button properties or JavaScript codes.

Solution 1Recommended

Apply Conditional Visibility and Unique Field Naming

This method ensures that the script only hides the button on the current page, allowing newly spawned pages to maintain functional and uniquely named buttons.

When a PDF page is spawned without renaming fields, all duplicated buttons share the same internal name. Thus, hiding one hides them all. Using the bRename parameter isolates each spawned button.

1
Open Button Properties

Enter the form editing mode in your PDF software, right-click the original spawn button, and select Properties.

2
Modify JavaScript Action

Navigate to the Actions tab and edit your 'Run a JavaScript' action. Append a script line to hide the current button after the spawn executes (for example, event.target.display = display.hidden;).

3
Use the bRename Parameter

Check your page spawn script to ensure it uses the bRename parameter set to true. This forces the newly spawned page to give its fields, including the new spawn button, unique names.

4
Keep Spawned Buttons Visible

Because the new button has a unique field name, the script execution on the original page will not affect it, leaving the button visible and fully functional for creating the next page.

Apply Conditional Visibility and Unique Field Naming
Testing the Form Hierarchy: Always exit form editing mode to test the behavior. Add multiple pages to verify that the template hierarchy is correct and the script does not break after several repetitions.
Advanced PDF Editing

Manage Advanced PDF Forms with WPS Office

WPS Office provides a comprehensive PDF editor that allows you to easily view, fill, and manage interactive PDF forms while maintaining excellent format compatibility.

  1. 1. Download and Install: Download WPS Office Free from the official website and open your PDF document using the WPS PDF editor.
  2. 2. Access Form Tools: Navigate to the Form tab on the top ribbon to access the interactive field controls and layout tools.
  3. 3. Edit Field Properties: Double-click any text field or button to modify its properties, appearance, and standard actions.
Easily interact with and manage PDF form fieldsSeamless format compatibility with standard Microsoft and Adobe PDF formatsLightweight application for smooth document handling without lag
microsoft office alternative - wps office

Frequently Asked Questions

Why does my spawn button disappear on all pages when clicked?

If your spawn button shares the exact same field name across all spawned pages, any JavaScript command that instructs the button to hide will affect every instance of that field name throughout the entire document.

What does the bRename parameter do in a PDF spawn script?

The bRename parameter, when set to true, automatically appends a unique prefix to the field names on the newly spawned page. This ensures they operate independently from the fields on the original template page.

Can I limit how many pages a user can spawn in my PDF form?

Yes, you can define a counter variable within your JavaScript that increments each time a new page is spawned. You can then use an if-statement to disable or hide the spawn button entirely once the predetermined limit is reached.