PDF Editing Issues

Fix Spawned PDF Page Losing Default Radio Button Selection

Olivia MillerOlivia Miller Nov 3, 2026 869 views

Question details

The user needs to maintain or restore the default radio button selection after spawning a hidden PDF template page.

Fix Spawned PDF Page Losing Default Radio Button Selection
Product
PDF
Device & OS
not provided
Scenario
Spawning a hidden PDF template page using JavaScript.
Observed behavior
The default radio button selection clears upon spawning, and re-setting the value immediately via JavaScript fails to restore it.
Before you start

Ensure you have access to the PDF form editing tools and the JavaScript console in your PDF editor to modify field properties and scripts.

Solution 1Recommended

Adjust Radio Button Properties and JavaScript Timing

Ensure the spawned radio buttons are configured to select in unison and that your JavaScript assigns values at the correct time using the exact instance name.

When spawning template pages in a PDF, form fields are duplicated with new instance names. If your script sets the value before the page finishes rendering, or targets the wrong field name, the radio buttons will remain blank.

1
Enable unison selection

Open the form editing mode, double-click the radio button to open its Properties, go to the Options tab, and check the option that allows buttons with the same value to be selected in unison.

2
Verify the spawned field name

Check your form fields to ensure your script targets the newly created field name, which includes the template instance prefix generated during spawning.

3
Match the export value

Verify that the value assigned in your JavaScript exactly matches the export value defined in the radio button's Options tab.

4
Delay the value assignment

Modify your script to set the field value only after the page spawning function has completely finished executing.

Adjust Radio Button Properties and JavaScript Timing
Pro Tip: Using console debugging in your JavaScript can help you verify the exact names of the newly spawned fields before attempting to set their values.

Effortlessly Manage PDF Interactive Forms with WPS Office

WPS Office provides a complete suite of PDF editing tools that allow you to insert, configure, and manage interactive form fields like radio buttons without relying on complex scripting.

  1. 1. Open PDF: Launch WPS Office and open your PDF document.
  2. 2. Access Form Tools: Navigate to the 'Form' tab located on the top ribbon menu.
  3. 3. Insert Radio Button: Click on the 'Radio Button' tool and click anywhere on the document to place the field.
  4. 4. Configure Properties: Double-click the inserted radio button to define its name, export value, and default state.
  5. 5. Save Document: Save your PDF to ensure all interactive elements and properties are preserved.
Easily add interactive form fields like radio buttons and checkboxes.Configure default form values and export settings through an intuitive interface.Fully compatible with standard PDF forms and Adobe Acrobat formats.Lightweight, fast, and highly efficient for everyday document management.
microsoft office alternative - wps office

Frequently Asked Questions

Why do PDF form fields reset when spawning a new page?

When a page is spawned from a template, the PDF reader generates new instances of the form fields with unique prefixed names. The original default values may not automatically carry over to the new instances if not handled properly in the script.

How do I find the export value of a PDF radio button?

Enter form editing mode, right-click the radio button, select Properties, and navigate to the Options tab. The 'Export Value' or 'Radio Button Choice' box contains the exact string you need to use in your scripts.

What is unison selection in PDF forms?

Unison selection is a property setting for radio buttons. When enabled, it ensures that if multiple radio buttons share the same name and export value, selecting one will automatically update the visual state of all identical buttons in the document.