When displaying a view, do you need to display phone numbers as links? If so, this code snippet that we use with the Developers Directory, strips all non numeric characters from a phone number. View the code on Gist. To use this snippet, replace the jQuery selector(s) with your field id(s).
Regex
Strip Non-numeric Characters from Phone Numbers
Whenever you capture a phone number on a form, wouldn’t be nice to also capture a version of the number that can be used in a tel: link on a view? Here’s a jQuery snippet that will do just that and store the value stripped of non-numeric characters in a hidden field with the exception [Read More…]