Phone Number Format

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
Williams
 
 
Posts: 102
Joined: Fri Nov 23, 2018 12:22 am
Contact:

Phone Number Format

Post by Williams »

Hey All,

Is there a way to set the phone number format like xxx-xxx-xxxx in the form editbox.

Image
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Phone Number Format

Post by Pablo »

You can use custom regular expressions (select 'custom').

This may be helpful:
https://www.codegrepper.com/code-exampl ... javascript
User avatar
Williams
 
 
Posts: 102
Joined: Fri Nov 23, 2018 12:22 am
Contact:

Re: Phone Number Format

Post by Williams »

Thank you Pablo for your support..
Actually I'm not familiar with Java script. so if you can let me know the value of this script that would be much better..
Thank you again very much for your time
User avatar
Pablo
 
Posts: 21575
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Phone Number Format

Post by Pablo »

You do not need JavaScript. You will only need to copy the regular expression.

Code: Select all

/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/im
Post Reply