solved simple forms phone number

soaringeagle
@soaringeagle
5 years ago
3,304 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: 12/19/19 02:27:12AM
paul
@paul
5 years ago
4,325 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
5 years ago
3,304 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
5 years ago
4,325 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
5 years ago
10,136 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
5 years ago
3,304 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