# Input element for Phone number

**URL:** <https://forum.wixstudio.com/t/input-element-for-phone-number/50374>\
**Category:** Ask the community\
**Created:** [April 12, 2021, 6:44am UTC](https://forum.wixstudio.com/t/input-element-for-phone-number/50374 "2021-04-12T06:44:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikobarli](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/nikobarli/32/15390_2.png) [@nikobarli](https://forum.wixstudio.com/u/nikobarli)\
**Post date:** [April 12, 2021, 6:44am UTC](https://forum.wixstudio.com/t/input-element-for-phone-number/50374/1 "2021-04-12T06:44:51Z")

</div>

Is there any ready-to-use input element for phone number ? Preferrably with a dropdown to select the country.

---

<div class="post-metadata">

**Author:** ![eduardog](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eduardog/32/669_2.png) [@eduardog](https://forum.wixstudio.com/u/eduardog)\
**Post date:** [April 12, 2021, 8:43am UTC](https://forum.wixstudio.com/t/input-element-for-phone-number/50374/2 "2021-04-12T08:43:27Z")

</div>

Hi @nikobarli

I believe you can do this using Velo  
[https://www.wix.com/velo/forum/coding-with-velo/make-a-user-input-phone-number-display-as-xxx-xxx-xxxx-on-entry](https://www.wix.com/velo/forum/coding-with-velo/make-a-user-input-phone-number-display-as-xxx-xxx-xxxx-on-entry)

---

<div class="post-metadata">

**Author:** ![nikobarli](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/nikobarli/32/15390_2.png) [@nikobarli](https://forum.wixstudio.com/u/nikobarli)\
**Post date:** [April 12, 2021, 10:15am UTC](https://forum.wixstudio.com/t/input-element-for-phone-number/50374/3 "2021-04-12T10:15:05Z")

</div>

@eduardog

Thank you. So there is no ready-to-use input element from EditorX, right ?

Hhmhh, Ok, I must use Velo then …

---

<div class="post-metadata">

**Author:** ![eduardog](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eduardog/32/669_2.png) [@eduardog](https://forum.wixstudio.com/u/eduardog)\
**Post date:** [April 12, 2021, 11:49am UTC](https://forum.wixstudio.com/t/input-element-for-phone-number/50374/4 "2021-04-12T11:49:17Z")

</div>

@nikobarli I did some digging and found out that you can also use Regex.

Regex (Regular Expression) is a series of numbers, characters and letters that ensure your visitors’ phone numbers save in the format you want.

How to use Regex:

1. Find or create the relevant Regex code for the phone number field in your form.

2. Add the Regex code in the **Phone Number Format** textbox.

![](https://us1.discourse-cdn.com/wix/original/3X/5/a/5a87306340cac99634477c28bbe446a4e25547ac.png)  
Examples of Regex Codes:  
Regex codes can be created however you want them, as long as they match the specific region’s rules. You can search online for a specific code for the desired area. A few examples are also below.

USA:  
Regex Code: \[1\]\d{2}\d{3}\d{4}$  
Description: This expression matches a hyphen separated US phone number, of the form ANN-NNN-NNNN, where A is between 2 and 9 and N is between 0 and 9.

Examples of matches: 800-555-5555 / 212-666-1234

Examples of non-matches: 000-000-0000 / 123-456-7890

If you don’t want to use the Advanced (Regex) number format, you can choose from the following options:

- **Default:** Your visitors can only enter phone numbers that include digits and parentheses.

- **Unformatted:** Your visitors can enter any phone number they want.

- **Custom:** Create a custom format for your visitors to follow. For example, you can use “#” to indicate numbers and “-” to indicate spaces.

> **[CMS: About Validation Settings for Input Elements | Help Center | Wix.com](https://support.wix.com/en/article/cms-about-validation-settings-for-input-elements)**
>
> When using Input elements to create custom forms, you can add validations to each of the Input elements. This ensures that your visitors can only submit values

* * *

1. 2-9
