Home › Forums › ACF PRO › How to format a phone number › Reply To: How to format a phone number
To limit input on a text field you would use an acf/validate_value filter.
For formatting the number you need to do that yourself. I would try a search for formatting phone numbers in PHP, here is one example result https://stackoverflow.com/questions/4708248/formatting-phone-numbers-in-php.
You could potentially use and acf/format_value filter, but this would probably be overkill unless you are using displaying the field in multiple templates, on the other hand if you are using a page builder that is capable of using ACF fields then this filter will probably be needed.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.