PDF Editing Issues

Create an Acrobat Form Field with a Fixed Suffix

Emma BrownEmma Brown Nov 19, 2026 868 views

Question details

Add a fixed suffix to a number entered in an Acrobat form field while preserving the editable number.

Create an Acrobat Form Field with a Fixed Suffix
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the field properties

In Acrobat, open All tools > Prepare a form, then double-click the text field you want to modify.

2
Add the suffix format

On the Format tab, select Custom, click Edit next to Custom Format Script, and enter: if (event.value !== "") event.value += "/100***";

3
Validate numeric input

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; }

4
Test the field

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.

Add a Custom Format and Validation Script in Acrobat
Viewer support varies: Test the saved PDF in the viewers your recipients will use. Some PDF viewers do not run Acrobat form JavaScript, so the formatting or validation may not work there.
Free Microsoft Office alternative

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.

Open and review PDF forms alongside other documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for an easier transition from Microsoft OfficeFree, lightweight tools for everyday document work
microsoft office alternative - wps office

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.