PDF Editing Issues

How to Display an X After a Number in an Acrobat Form Field

Muhammad TalhaMuhammad Talha Nov 5, 2026 869 views

Question details

The user needs to append a specific text character, such as an 'x', to the end of a numeric value in a PDF form field without breaking downstream calculations.

How to Display an X After a Number in an Acrobat Form Field
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Setting up fillable PDF forms where certain input fields require a custom numeric suffix for display purposes.
Observed behavior
Adding letters directly into a numeric field converts the data to a text string, causing dependent calculation formulas to fail. A display-only formatting solution is required.
Before you start

Ensure you have a PDF editing tool that supports custom JavaScript formatting for form fields, and verify that the target text field is set up to receive numeric input.

Solution 1Recommended

Apply a Custom JavaScript Format to the Form Field

Use a custom formatting script to visually append the 'x' suffix to the number while maintaining the underlying numeric value for calculations.

Unlike spreadsheet applications that use built-in format masks, PDF form fields rely on JavaScript for advanced display formatting. By using a custom format script, you can change how the value looks on the screen without altering the actual data used by other calculating fields.

1
Enter form editing mode

Open your PDF document in Adobe Acrobat, navigate to the Tools menu, and select 'Prepare Form' to enable form editing.

2
Open field properties

Right-click the target text field where you want the suffix to appear and select 'Properties' from the context menu.

3
Select custom format

Navigate to the 'Format' tab within the Properties dialog box. Click the 'Select Format Category' dropdown menu and choose 'Custom'.

4
Input the formatting script

In the Custom Format Script text box, enter the following code: if (!event.willCommit) event.value = util.printf("%,0.0f", Number(event.value)) + " x";

5
Save and test

Click 'Close' to save the properties. Exit form editing mode and type a number into the field to verify that the 'x' suffix is displayed correctly.

Apply a Custom JavaScript Format to the Form Field
Number Formatting Adjustment: You can customize the "%,0.0f" portion of the script to change how the number is formatted. For example, use "%,0.2f" if you need to display two decimal places before the 'x' suffix.

Create and Manage PDF Forms Easily with WPS Office

WPS Office features a powerful PDF editor that allows you to easily create, edit, and configure interactive fillable forms. You can format text fields, set up form properties, and handle interactive elements intuitively.

  1. 1. Open your PDF: Launch WPS Office and open your PDF document.
  2. 2. Navigate to the Form tab: Click on the 'Form' tab located on the top ribbon to access all interactive form tools.
  3. 3. Add or select a field: Use the 'Text Field' tool to draw a new input box, or click to select an existing field on your document.
  4. 4. Configure properties: Double-click the selected field to open its Properties dialog, where you can easily configure appearance, formatting, and behavioral settings.
Fully compatible with standard PDF forms and Adobe Acrobat document formatsIntuitive drag-and-drop tools to insert text fields, checkboxes, and drop-down menusEasily accessible field properties for customized formatting and alignmentLightweight, fast, and feature-rich compared to heavy alternative software
microsoft office alternative - wps office

Frequently Asked Questions

Can I add the 'x' before the number instead of after?

Yes. You can modify the custom format script to place the text string first. Change the script to read: event.value = "x" + util.printf("%,0.0f", Number(event.target.value)); in your custom formatting settings.

Why doesn't an Excel-style custom mask work in Acrobat?

PDF form fields utilize JavaScript for advanced data formatting and calculations. This environment operates differently from spreadsheet applications like Excel, which rely on built-in proprietary mask codes. Therefore, display modifications in PDFs generally require a short script.

Will adding text to a number field break my calculations?

If you manually type an 'x' into the field, it changes the data type to text and breaks calculations. However, if you use a custom formatting script, the script only alters the display value while keeping the underlying data strictly numeric, allowing other fields to calculate correctly.