How to Format Phone Numbers and Preserve Leading Zeros in PDF Forms
Question details
The user needs to format telephone numbers with specific spacing and retain leading zeros (e.g., 00123456) in a fillable PDF form.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating or editing a fillable PDF form that requires specific telephone number formatting, such as UK phone numbers with spaces and leading zeros.
- Observed behavior
- Numeric form fields automatically strip out leading zeros, and default settings do not accommodate custom spacing for regional phone numbers.
Ensure you are in the form editing mode of your PDF software and have the necessary document permissions to modify form field properties.
Apply an Arbitrary Mask for Custom Phone Formats
Use the Special Format category to create an arbitrary mask that enforces specific spacing, such as for UK phone numbers.
By setting a custom arbitrary mask, you can force the form field to accept characters in a very specific pattern, automatically inserting spaces or dashes where needed.
Right-click the specific text field in your PDF form and select 'Properties' from the context menu.
In the Properties dialog box, click on the 'Format' tab at the top.
Click the 'Select format category' dropdown menu and choose 'Special'.
Select 'Arbitrary Mask' and enter your desired pattern (e.g., using '9' for numbers and inserting spaces where required for your regional phone format). Click 'Close' to apply.

Use Text Fields to Preserve Leading Zeros
Prevent your PDF software from automatically deleting leading zeros by changing the field type from numeric to standard text.
Create and Format PDF Forms Easily with WPS Office
WPS Office provides comprehensive PDF editing tools, allowing you to easily add text fields, customize formats, and ensure data like phone numbers retain their exact formatting without losing leading zeros.
- 1. Open the PDF: Launch WPS Office and open your PDF document.
- 2. Access Form Tools: Navigate to the 'Form' tab to access the form creation and editing tools.
- 3. Insert a Text Field: Click 'Text Field' and draw the box where you want the phone number to be entered.
- 4. Adjust Properties: Double-click the new field to open its Properties. Ensure the format is set to 'Text' (or 'None') to keep leading zeros intact when users fill it out.

Frequently Asked Questions
Why do my leading zeros disappear when typing in a PDF form?
If a form field is formatted as a 'Number,' the PDF software will automatically remove leading zeros, treating the input as a mathematical value. Changing the field format to 'None' or 'Text' resolves this issue.
What is an Arbitrary Mask in PDF forms?
An arbitrary mask is a custom format pattern you can define in the field properties. It restricts data entry to specific characters and structures, such as adding spaces or dashes automatically in a phone number.
Can I apply the same formatting to multiple fields at once?
Yes. In most PDF editors, you can select multiple form fields while in edit mode, right-click to open Properties, and apply the format mask or text setting to all selected fields simultaneously.




