PDF Editing Issues

How to Add Feet and Inches Symbols to a PDF Form Field

Nimra MalikNimra Malik Oct 28, 2026 868 views

Question details

The user wants to format a PDF form field so that entering a whole number automatically appends feet and inches symbols (for example, converting '30' into '30\' 0"').

How to Add Feet and Inches Symbols to a PDF Form Field
Product
PDF Editor
Device & OS
not provided
Scenario
Designing a custom PDF form that requires specific measurement formatting to standardize user input.
Observed behavior
The form field needs to display formatted text with measurement symbols without requiring the user to type the symbols manually.
Before you start

Determine whether you need a single field for whole numbers (e.g., exactly 30 feet) or if users will need to enter mixed fractional measurements like 30' 6", as this will determine the complexity of the script needed.

Solution 1Recommended

Apply a Custom Format Script to the Form Field

Use JavaScript in the field's formatting properties to automatically append the feet and inches symbols when a user enters a number.

This method is ideal if users are only entering whole feet values and you want to automatically append the ' 0" suffix to the display.

1
Open form editing mode

Open your PDF in your PDF editor and enter the Form Editing or Prepare Form mode.

2
Access field properties

Right-click the target text field where users will input the measurement and select Properties.

3
Select custom format

Navigate to the Format tab. From the 'Select format category' drop-down menu, choose 'Custom'.

4
Enter the JavaScript

In the Custom Format Script window, enter the following code exactly: if (event.value) event.value += "' 0\"";

5
Save and test

Click OK or Close to save the properties. Exit form editing mode and type a number like 30 into the field to see it change to 30' 0".

Apply a Custom Format Script to the Form Field
Display vs Actual Value: This script changes only how the number is displayed to the user. The underlying stored value of the field remains exactly what the user typed (e.g., 30).
Create and Edit PDF Forms Easily

Manage PDF Form Fields with WPS Office

WPS PDF provides robust tools for creating interactive PDF forms, adding text fields, and customizing properties, making it easy to gather structured measurement data.

  1. 1. Open your PDF: Launch WPS Office and open your PDF document in the PDF viewer.
  2. 2. Access form tools: Navigate to the Form tab on the top ribbon to access all form creation tools.
  3. 3. Insert text fields: Click 'Text Field' and draw the input box on your document where the measurements will go.
  4. 4. Adjust properties: Double-click the newly created field to open its properties and adjust the formatting or validation settings.
Easily insert text fields, checkboxes, and drop-down menus.Customize form field properties and formatting effortlessly.Fully compatible with standard PDF forms created in Adobe Acrobat.
microsoft office alternative - wps office

Frequently Asked Questions

Can I format the field to accept decimal inputs for inches?

Yes, but it requires a more advanced custom keystroke or formatting script using JavaScript to convert decimal inputs (like 30.5) into proper feet and inches formats (like 30' 6"). For simplicity, using separate fields is generally recommended for complex inputs.

Why doesn't my custom format script work when I export the form data?

Format scripts only alter the visual display of the field. If you export the form data to a spreadsheet, it will export the raw value the user entered (e.g., 30) rather than the formatted string (30' 0").

Do JavaScript formatting scripts work on mobile PDF readers?

Many mobile PDF viewers have limited or no support for JavaScript. Custom formatting scripts may not execute properly on smartphones or tablets, so testing on your target platforms is highly recommended.