CCK Field Type for Phone Numbers

Published July 22, 2009

This is going to be a really quick QuickTip today - if you've ever added a generic text field to a CCK content type to contain a phone number - stop it.

The super-simple Phone module provides a bunch of country-specific phone number field types. It automatically formats the numbers for display (you choose the separate and/or the area code delimiter) as well as validates the number (for several different countries). It even has iPhone support: if the page containing the phone number is being displayed by an iPhone, the module will automatically turn it into a link that can be tapped to dial the number on an iPhone. Sweet.


I'm thinking surely you don't want to add every country available as separate fields. That will be one big form...

Is there not a way of having one field that says, if it meets at least one of these validators, then it a phone number? Or at least a type that can accept a phone number but at least checks that it contains only numbers?

Submitted by Guest (not verified) on Wed, 06/16/2010 - 20:19

Sign up to receive email notifications of whenever we publish a new blog post or quicktip!