Other PDF Issues

How to Allow Currency Values in PDF Number Form Fields

Rana GarciaRana Garcia Nov 5, 2026 870 views

Question details

The user needs to configure a PDF form text field formatted as a number so that it accepts user-pasted currency strings containing symbols and commas.

How to Allow Currency Values in PDF Number Form Fields
Product
PDF Editors
Device & OS
not provided
Scenario
Setting up interactive PDF form fields for financial data entry where users frequently copy and paste pre-formatted currency values.
Observed behavior
Standard PDF number formats reject pasted values that include currency symbols and thousands separators, preventing proper data entry.
Before you start

Ensure you have advanced PDF editing software capable of form creation and JavaScript implementation installed, and verify you have permission to edit the target PDF document.

Solution 1Recommended

Implement a Custom Format Script

Use a custom JavaScript to strip out non-numeric characters like currency symbols and commas during entry, and then format the raw number appropriately.

By default, built-in PDF number formatting strictly restricts inputs to digits and decimal points. When a user tries to paste a string like '$1,234.00', the system rejects it because of the dollar sign and comma.

To bypass this limitation, you can apply custom Keystroke and Format scripts to the field. This allows the field to accept the pasted string, remove the invalid characters in the background, and correctly process the numeric value.

1
Enter Form Editing Mode

Open your document in your PDF editor and access the interactive form creation tools from the main toolbar.

2
Open Field Properties

Right-click the specific text field you want to modify and select 'Properties' from the context menu.

3
Navigate to the Format Tab

In the Properties dialog box, click on the 'Format' tab located at the top.

4
Select Custom Category

Change the 'Select format category' dropdown menu to 'Custom'.

5
Add the Custom Scripts

Enter a custom Keystroke script to permit currency symbols and separators, followed by a custom Format script that uses Regex to parse the string into a valid number.

Implement a Custom Format Script
JavaScript API Knowledge: Implementing custom scripts requires basic familiarity with Adobe Acrobat's JavaScript API and regular expressions (Regex) to correctly filter character inputs.
Powerful PDF Form Editing

Create and Manage PDF Forms with WPS PDF

WPS Office provides robust PDF editing capabilities, allowing you to easily insert text fields, customize data formats, and manage form properties to ensure seamless data entry for your users.

  1. 1. Open WPS Office: Launch WPS Office and open your PDF document using the built-in WPS PDF tool.
  2. 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to reveal the interactive form creation tools.
  3. 3. Edit the Target Field: Double-click the specific text field to open its Properties dialog.
  4. 4. Customize Field Format: Click on the 'Format' tab and select the desired category to control how numeric or text entries are handled.
Easily add, edit, and format interactive text fields in PDF documents.Fully compatible with standard PDF form functionalities and Adobe Acrobat forms.Supports advanced form properties for precise user input control.Lightweight, all-in-one suite covering Word, Excel, PowerPoint, and PDF editing.
microsoft office alternative - wps office

Frequently Asked Questions

Why does a PDF number field reject copied and pasted dollar signs?

When a field is formatted strictly as a 'Number', the built-in PDF validation rules only accept numeric digits (0-9) and standard decimal points. Dollar signs and commas are recognized as text characters and are consequently blocked to prevent calculation errors.

Can I automatically add a currency symbol when users type normal numbers?

Yes. Instead of relying on users to paste or type the symbol, you can go to the field's Format tab, select the 'Number' category, and choose a specific currency symbol from the dropdown menu. The symbol will be applied automatically after the user finishes entering the digits.

Do custom PDF JavaScripts work in web browsers?

Generally, advanced interactive features like custom JavaScript validation and formatting are fully supported in dedicated desktop PDF editors like Acrobat or WPS Office, but they may fail or behave unpredictably when opened in lightweight browser-based PDF viewers.