How to Allow Currency Values in PDF Number Form Fields
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.

- 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.
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.
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.
Open your document in your PDF editor and access the interactive form creation tools from the main toolbar.
Right-click the specific text field you want to modify and select 'Properties' from the context menu.
In the Properties dialog box, click on the 'Format' tab located at the top.
Change the 'Select format category' dropdown menu to 'Custom'.
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.

Change Field Format to Standard Text
Remove the strict number formatting requirement from the field so it accepts any alphanumeric string.
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. Open WPS Office: Launch WPS Office and open your PDF document using the built-in WPS PDF tool.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to reveal the interactive form creation tools.
- 3. Edit the Target Field: Double-click the specific text field to open its Properties dialog.
- 4. Customize Field Format: Click on the 'Format' tab and select the desired category to control how numeric or text entries are handled.

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.




