Skip to Content Skip to Menu

Phone number format

  • ernienet
  • ernienet
  • ONLINE
  • Posts: 140
  • Thanks: 11
  • Karma: 2
1 hour 47 minutes ago #343052 by ernienet
Phone number format was created by ernienet
Is there a way to force a phone number format (US)?

Users sometimes just enter the digits, some enter a "1" before the area code, others add an extension after the phone number. Unfortunately, this all looks inconsistent when it's displayed in a list of users.

Thank you,
Ernie

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 50045
  • Thanks: 8562
  • Karma: 1467
1 hour 10 minutes ago #343053 by krileon
Replied by krileon on topic Phone number format
You could use a text field then use input masking to force a format, but this only applies at input time so it won't do anything for existing numbers. Another option is to use CB Code Field and use PHP to format the fields value however you like, set that code field on a tab in a not shown on profile position, then edit your phone field and for its Layout parameters for profile and registration view substitute in that code field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum