PDF Editing Issues

Fix PDF Form Submit Button Sending Field Names Instead of Values

Tauseeq MagsiTauseeq Magsi Nov 5, 2026 869 views

Question details

The user needs to configure a fillable PDF form to submit user-entered data to a custom URL, such as a Google Form, because the standard submit button is incorrectly transmitting the internal field names instead of the actual input values.

Fix PDF Form Submit Button Sending Field Names Instead of Values
Product
PDF
Device & OS
not provided
Scenario
Submitting interactive PDF form data to a web endpoint or Google Form via a custom URL.
Observed behavior
The standard Submit Form action sends the internal field names rather than dynamically mapping and transmitting the values entered by the user.
Before you start

Ensure you have access to the PDF's form editing mode and a basic understanding of JavaScript, as resolving this requires replacing the default submit action with a custom script.

Solution 1Recommended

Use Custom JavaScript to Extract and Submit Field Values

Replace the default Submit Form action with a custom JavaScript snippet attached to the button to read user inputs and construct the correct submission URL.

The standard 'Submit Form' action in PDF editors is not designed to dynamically insert field values into a custom URL like a Google Form endpoint. To resolve this, you must write a document-level or button-level JavaScript function.

The script will extract the value of each specific field and append it as a query parameter to your target URL before launching it.

1
Open the PDF in Form Editing mode

Launch your PDF editor, open the fillable form, and enter the Form Editing mode to access the properties of your submit button.

2
Access button properties

Right-click the submit button and select 'Properties'. Navigate to the 'Actions' tab.

3
Change the action type

Delete the existing 'Submit a form' action. Select 'Run a JavaScript' from the 'Select Action' dropdown menu and click 'Add'.

4
Write the JavaScript code

Enter a script that retrieves the field values using this.getField("FieldName").value and constructs your final URL. Use app.launchURL(constructedURL, true); to execute the submission. Click OK to save.

5
Test the form submission

Exit form editing mode, fill in sample data, and click the submit button. Ensure your PDF viewer's JavaScript security settings allow the script to execute.

Use Custom JavaScript to Extract and Submit Field Values
Security Settings: Make sure that JavaScript execution is enabled in your PDF viewer's preferences, otherwise the script will be blocked from running.
Advanced PDF Form Editing

Create and Manage Fillable PDF Forms with WPS Office

WPS PDF provides comprehensive form editing tools, allowing you to easily add text fields, buttons, and custom JavaScript actions to create highly interactive PDF forms.

  1. 1. Open WPS PDF: Launch WPS Office and open your PDF document using the PDF tab.
  2. 2. Access the Form tab: Click on the 'Form' tab in the top ribbon to reveal all interactive form controls.
  3. 3. Add a Push Button: Select 'Push Button', place it on your document page, and double-click the button to access its properties.
  4. 4. Configure JavaScript Action: In the properties window, navigate to the Actions tab, choose 'Run a JavaScript', input your custom code to handle the URL submission, and save your document.
Easily insert and configure form fields, checkboxes, and buttonsSupport for interactive form JavaScript elements for advanced submissionsFully compatible with standard PDF form specifications and Adobe AcrobatLightweight application with an intuitive, user-friendly interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the default submit action send field names?

The default 'Submit a form' action in PDFs is designed to send the entire form data structure (often as FDF, XFDF, or HTML POST) using standard key-value pairs. If the receiving endpoint isn't formatted to parse this specific payload, it may only register the static URL parameters or field names you entered in the submit URL configuration.

Can I submit PDF form data to a Google Form without JavaScript?

Generally, no. Google Forms require specific URL parameters and entry IDs. A standard PDF submit action cannot dynamically format user input into a Google Form's required URL query string without utilizing custom JavaScript.

How do I enable JavaScript in my PDF reader?

In most standard PDF readers, you can enable JavaScript by going to 'Preferences' or 'Options', navigating to the 'JavaScript' category, and checking the box that says 'Enable Acrobat JavaScript' or similar wording.

What is the basic JavaScript syntax to get a field value in a PDF?

You can retrieve a field's value using the syntax: var myValue = this.getField("YourFieldName").valueAsString;. You can then append this variable to a string to construct your submission URL.