solved simple forms phone number

soaringeagle
@soaringeagle
one month ago
3,230 posts
i just noticed theres no option for a feild type "phone number' nor any option for a text feild to validate as a phone number
would it be teribly complicated? would there be a way to do it without having diferent feild types and/or validations for internattional vs local numbers


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 18 Sep 2019 06:29:16PM
paul
@paul
one month ago
3,854 posts
This can be done, of course, but wondering how many phone number formats, world wide, it would have to cater for? And all the different ways of writing a phone number (spacings, country code in brackets etc.).


--
Paul Asher - JR Developer and System Import Specialist
soaringeagle
@soaringeagle
one month ago
3,230 posts
maybe the phone number feild could be a dual feild/ a dropdown to select the country and that in turn sets the format of the 2nd feild/
so if you select usa the input feild would have (xxx) xxx-xxxx


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
paul
@paul
one month ago
3,854 posts
Will create an internal tracker for this so that its potentially on our 'to do' list.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
brian
@brian
one month ago
9,894 posts
The problem with phone numbers is there is about 100+ different ways of inputting them. With Core 6.4.1 there will be a new "phone_number" validator for the form designer - it will just verify the characters entered are 0-9, -, (, ), + and spaces.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
one month ago
3,230 posts
that works! great thanks


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

Tags