Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

How can you set the format for France Tel

  • sereniteam
  • sereniteam
  • OFFLINE
  • Posts: 246
  • Thanks: 17
  • Karma: 0
9 months 3 days ago #337594 by sereniteam
How can you set the format for France Tel was created by sereniteam
I get a telephone field but I need to fix myself the right setting like : 06 02 04 05 07 
When people enter their number like : 0602040507 I always has to set a blank inbetween . Is there a solution or a condition to fix it by default ? 
Actually this field is a text field ! I am right ? 

 

SereniTeam

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 months 3 days ago #337595 by krileon
Replied by krileon on topic How can you set the format for France Tel
You can use the Input Mask feature for Text fieldtypes to force a format. Review its parameter description carefully as it explains how to provide the masking.


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.

  • sereniteam
  • sereniteam
  • OFFLINE
  • Posts: 246
  • Thanks: 17
  • Karma: 0
9 months 1 day ago #337599 by sereniteam
Replied by sereniteam on topic How can you set the format for France Tel
I fixed this expression but nothing happen : (\d{2}\s?){5}\d{2} in the appropriate field

SereniTeam

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 months 18 hours ago #337604 by krileon
Replied by krileon on topic How can you set the format for France Tel
That's not valid REGEXP. You don't have a delimiter. You need to provide the full valid REGEXP. You can also use the string input mask feature and read the description carefully as it's a bit easier to configure than REGEX. Note the input mask doesn't apply any on-display formatting. It only assists with formatting during editing so existing values already saved won't reformat.


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.

  • sereniteam
  • sereniteam
  • OFFLINE
  • Posts: 246
  • Thanks: 17
  • Karma: 0
9 months 14 hours ago #337611 by sereniteam
Replied by sereniteam on topic How can you set the format for France Tel
You're right a find the right expression : /^0[1-9]((\s)?(\d{2})){4}$/

But then on front side I got something strange in the field and cannot enter any number :

such as : %2F%5E0%5B1-9%5D%28 instead of having a with space to enter the tel number ike that .... Strange no ? Do you have any clue

SereniTeam

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
9 months 14 hours ago #337612 by krileon
Replied by krileon on topic How can you set the format for France Tel
The REGEXP needs to be JavaScript compatible as this is entirely done client side. It's significantly easier to make a text mask maybe give that a try otherwise you'll need to trial and error your REGEXP.


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