What is the best field type to use for a phone number?

owayslate's picture

February 29, 2012

What is the best field type to use for a phone number?  Is there any way to have parenthesis automatically show up for the area code and a dash in between the numers? (XXX)XXX-XXXX

Also, can I limit the users who will see the phone number to registered or authenticated users?  Is this done on the same page?

I have it set to Field visibility and permissions:  Custom permissions

View anyone's value for field Contact PhoneChecked authenticated user

Is this the correct way to approach it?

I have searched the forum but can't find anything.  Thanks so much!

Status: Resolved


stacywray March 2, 2012

Hi owayslate,

The best field to use would be the regular text field.

Under your default value for the field, you can set up the parentheses and dash between the numbers. I would recommend setting the default as shown below so that the user could just go in and replace the placeholder digits with their own:

(XXX) XXX-XXXX or (123) 456-7890

Here are a series of screenshots demonstrating the above as well:

https://skitch.com/e-stacywray/8guq9/create-webform-stacywray-heart-testing (auto phone number)



The permissions you mentioned above are the correct settings. If you choose to display the information in a block, you will also need to restrict visibility of the block to authenticated users.

Hope that helps!


Best regards,


Stacy Wray | Acquia Senior Support Engineer

stacywray October 1, 2012

Hi owayslate,

I'm closing out this post due to inactivity.

Please feel free to create a new thread if needed.

Thank you!


Best regards,

Stacy Wray | Acquia Senior Support Engineer

This topic has been closed to further comments.