PhoneUS
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
After searching around, I noticed there was no simple solution for a US based phone number formatter. There are a couple solutions (Phone and Phone Number) for US and International, using a separate formatter and field, but nothing I could see that I could use with a simple textfield.
This module adds an extra formatter to textfields that allows you to select "US Phone Number". The module converts the phone number into the standard US phone number format.
To set up:
1. Turn the module on like usual (Drush en phoneus)
2. Create a textfield, and limit output to 10.
2. Under manage display, select "US Phone Number".
Output: (123) 124-1234
TODO: add JS formatting for user while typing. Remove limit, as JS will validate this. Add the 0 for views bug.
