[SOLVED] problem with phonenumbers

14 years 3 months ago #119792 by FlorinaH84
[SOLVED] problem with phonenumbers was created by FlorinaH84
hi @ all,

i want so show in the profile the members telephone numberm, so i created a field as integer number. The problem is that when i fill out the profile field with the phone number beginning with 0049123456789 then the number is getting transformed an showing wrong in the profile.

Is there a solution to fill out fields with phone number and country code?

Because I need this in this format for the sms component in joomla to send sms.

Post edited by: krileon, at: 2010/08/09 21:53

Please Log in to join the conversation.

14 years 3 months ago #119797 by krileon
Replied by krileon on topic Re:problem with phonenumbers
Integer fields strip zeros from the beginning of a number, because they're invalid. This is just the behavior of the integer field. I recommend using a text field with an expression as follows.

Regex:
[code:1]
\(?\b[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}\b
[/code:1]

Matches:
5555555555
555.555.5555
555-555-5555
555 555-5555
(555) 555-5555


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 to join the conversation.

13 years 10 months ago #133662 by bepos
Replied by bepos on topic Re:problem with phonenumbers
doesn't work for me. don't understand.

i get this error :

preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /...../components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php on line 74

i'm using latest version of CB and Joomla!

kind regards

Please Log in to join the conversation.

13 years 10 months ago #133680 by krileon
Replied by krileon on topic Re:problem with phonenumbers
Was simple an example. Please try the following.

[code:1]
/\(?\b[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}\b/
[/code:1]

More information on regex usage can be found here .


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 to join the conversation.

13 years 8 months ago #138530 by aGiver
Replied by aGiver on topic Re:problem with phonenumbers
Hi Krileon

Can you tell us where do you insert this expression:

/\(?\b[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}\b/

I am new to CB but not to Joomla. I understand that the field needs to be a Text field. I am not a programmer but I can make changes to HTML, PHP and MYSQL files.

I am trying to add fields to the Registration form (mod_cblogin installed and fields added). Thereafter the user be able to edit the profile. The problem is that Telephone Numbers with leading zeros is not saved correctly, and the mobile number is saved as some random number.

Thanking the forums members for any help.
Jay

Please Log in to join the conversation.

13 years 8 months ago #138531 by krileon
Replied by krileon on topic Re:problem with phonenumbers
You'll need to edit the field in Field management and change the validation to custom PERL regular expression. Then within the new parameter box that appears to provide you expression add the expression you want.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.284 seconds

Facebook Twitter LinkedIn