Create an Acrobat Form Field with a Fixed Suffix
Question details
Add a fixed suffix to a number entered in an Acrobat form field while preserving the editable number.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A form author wants a text field to display a number followed by a fixed suffix such as /100***.
- Observed behavior
- The completed field should show the suffix while allowing the user to edit the numeric portion.
Open the PDF in a version of Adobe Acrobat that supports editing form fields, and identify the text field that should receive the suffix. Decide which numeric inputs to accept; the validation example below allows nonnegative whole numbers and decimals.
Add a Custom Format and Validation Script in Acrobat
Use field scripts to display a fixed suffix and reject entries that are not numbers.
The format script changes the displayed value, while the underlying field value remains available for editing. The validation script runs when the field value is committed, such as when the user leaves the field.
In Acrobat, open All tools > Prepare a form, then double-click the text field you want to modify.
On the Format tab, select Custom, click Edit next to Custom Format Script, and enter: if (event.value !== "") event.value += "/100***";
On the Validate tab, select Run custom validation script, click Edit, and enter: if (event.value !== "" && !/^(?:\d+(?:\.\d+)?|\.\d+)$/.test(String(event.value))) { app.alert("Enter a nonnegative number."); event.rc = false; }
Close the field properties and use Preview in Prepare a form. Enter a number, leave the field, and confirm that the suffix appears; then edit the field and try a nonnumeric entry.

Work with PDFs and Office Documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office files. Its format compatibility helps you move existing documents into your workflow, although it does not fix Acrobat-specific form scripts.

Frequently Asked Questions
Can I change the suffix to another value?
Yes. In the field's Format tab, edit the Custom Format Script and replace /100*** with the fixed text you want to display.
Why does the validation script reject negative numbers?
The example accepts only nonnegative whole numbers and decimals. If your form needs negative values or another number format, adjust the validation expression in the field's Validate tab.
How can I show the number in words?
Create a separate text field in Prepare a form and use a custom calculation script to convert the numeric field's value to words. That conversion requires a separate number-to-words script.
Will the suffix appear in every PDF viewer?
Not necessarily. The suffix depends on Acrobat form JavaScript, which some PDF viewers do not support. Test the saved form in the viewer recipients will use.




