Add an Editable Prefix to an Acrobat PDF Text Field
Question details
Add a default prefix to a PDF text field while allowing users to edit or replace it.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A PDF form author wants a text field to start with a prefix such as AW without making the prefix permanent.
- Observed behavior
- The field should show or add the prefix initially, then allow users to change the full field value.
Open the PDF in Adobe Acrobat and make sure you can edit its form fields. Decide whether the prefix should appear before the user types or only after the first value is entered.
Set an Editable Default Value in Acrobat
Use a default value when the prefix should be visible as soon as a user opens the form.
Open the PDF in Acrobat and select All tools > Prepare a form.
Double-click the text field, or add a text field and then open its properties.
On the Options tab, enter AW followed by a space in the Default Value box.
On the General tab, make sure Read Only is unchecked. Close the properties dialog and save the PDF.
Select Preview in Prepare a form, then click the field and try editing or replacing AW.

Add a Prefix After the First Entry With Validation
Use a validation script when the field should start empty and receive the prefix after a user enters a value.
Work With PDFs and Office Files in WPS Office
WPS Office is a free, lightweight alternative for working with PDFs and Office files in a familiar interface. Its format compatibility makes it easy to bring existing documents into your workflow. Use Acrobat for the field properties and validation script described above.

Frequently Asked Questions
How do I make the prefix visible before anyone types?
In Acrobat, open All tools > Prepare a form, open the text field's properties, and enter the prefix in Options > Default Value.
Can users replace the default prefix?
Yes. In the field properties, make sure General > Read Only is unchecked. Users can then select and replace the default text.
Why does the validation script add the prefix again?
The script checks whether the previous field value was empty. If the user clears the field and later enters a new value, the condition is met and the prefix is added again.
Will the validation script work in every PDF viewer?
No. The script requires a PDF viewer that supports Acrobat form JavaScript and has it enabled. Test the saved form in the viewer your users will use.




