> For the complete documentation index, see [llms.txt](https://docs.optis.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optis.me/product-options/20-option-types/text-input/phone-field.md).

# Phone Field

A **Phone Field** lets customers pick their country from a flag list and type a phone number. Only digits are accepted, and the number is saved with its country code (e.g. **+84 371 234 567**).

✨ [Demo product](https://optis-product-options-variant.myshopify.com/products/phone)

{% hint style="info" %}
**Plan:** **Phone** is available on the **Advanced** plan and above. On the Free plan you can still try it on one live product with a Premium option set. See [Plans and feature availability](https://docs.optis.me/product-options/getting-started/plans-and-features.md).

**Storefront:** **Phone** works on [OPTIS Storefront V2](https://docs.optis.me/product-options/optis-storefront-v2.md) only. On the legacy storefront it shows a **Storefront V2** badge in the editor and is not displayed on the product page.
{% endhint %}

## When to use a Phone Field

* **Delivery or installation contact** - a number the courier or installer can call.
* **Gift recipient** - the recipient's number for flowers, cakes or surprise deliveries.
* **Booking confirmation** - confirm a reservation or appointment by call or SMS.

## How to add a Phone Field option

### Step 1: Add the option

Open **1. Add options**, click **Add option**, tick **Phone** under **Text input** on the **New options** tab, then click **Add options**.

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FqXBK2iL8v8yjgziIy1nj%2Fimage.png?alt=media&amp;token=294fbf84-bd9a-4b80-ac19-8ad926b28d71" alt=""><figcaption></figcaption></figure>

### Step 2: Name it

Enter the **Label on product** (e.g., "Phone number"). Use **Label on cart** if the cart and order should show a different name. Tick any options below based on your needs:

* **Required field** if customers must fill it in
* **Hide option label** to hide the label

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2F1NUZDmmQY356RPNWMNzr%2Fimage.png?alt=media&amp;token=46fe59c3-f486-45fd-9ec5-687580694238" alt=""><figcaption></figcaption></figure>

### Step 3: Choose the countries

* **Country selection** - **All countries** (default), or **Selected countries only** to limit the list, e.g. to the countries you ship to.
* **Country values** - shown with **Selected countries only**. Search and tick the countries to allow.
* **Default country** - the country pre-selected on the product page. It starts as your store's country.

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FWsBgEWAMV4hBnRvFAX1P%2Fimage.png?alt=media&amp;token=0b016622-1c6a-4f26-8997-e8176daf00a8" alt=""><figcaption></figcaption></figure>

### Step 4: Save and test

Click **Save**, then open the product page on your store. Try switching the country, typing a number and adding the product to cart.

## Option settings

Set only what you need - all of the settings below are optional.

* **Addon**: Charge more when a customer fills in this field. Available on the **Advanced** plan and above; **Upsell product** needs **Platinum**.
  * **Extra fee** - adds a fixed amount to the price. See [Manage add-on (additional fee for option)](https://docs.optis.me/product-options/advanced-setup/manage-add-on-additional-fee-for-option.md).
  * **Upsell product** - links the fee to a Shopify variant's price and stock. See [How to Use "Upsell product"?](https://docs.optis.me/product-options/advanced-setup/how-to-use-upsell-product-link-stock-and-price-of-shopify-variant-to-option-value.md).
* **SKU** - a SKU for this field. Advanced plan and above. See [How does Product Option SKU works?](https://docs.optis.me/product-options/customize-design/how-does-product-option-sku-works.md).

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FpHeTFpqANunKnmanvNYJ%2Fimage.png?alt=media&amp;token=a6880bdc-e93d-49a6-8645-46a68cfcdb8f" alt=""><figcaption></figcaption></figure>

### Validate phone number

Tick **Validate phone number** to block **Add to cart** when the number does not match the phone format of the selected country. The number is also formatted as the customer types (e.g. **(201) 555-0123** for the United States), and OPTIS removes a leading 0 or a repeated country code before saving.

* If the number is not valid, OPTIS shows **Phone number is invalid.** under the field. You can change this text in **Settings > Translation Texts > Default text customization > Product page**.

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FSPGPbPjPOYj94EN6CCP2%2Fimage.png?alt=media&amp;token=66d04f8e-d396-41a3-ad36-5358e3cada1d" alt=""><figcaption></figcaption></figure>

* When the box is not ticked, any digits are accepted and saved as typed, with the country code in front (e.g. **+84 0371234567**).

### Option text

* **Placeholder text** - a faded hint shown inside the field. Leave it empty to show an example number for the selected country instead. Available on every plan.
* **Default value** - a number (digits only) that is already filled in when the customer opens the product page. If **Validate phone number** is on, it must be a valid number for the default country. Available on the **Advanced** plan and above.
* **Help text -** Add a short note explaining what to enter. Choose how it's shown: **Tooltip**, **Below the option title**, **Beside the option title**, or **Below the option**.

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FJpLsVc8hgSTHDJa99hQw%2Fimage.png?alt=media&amp;token=fa87e058-be68-4997-a641-c952c6484593" alt=""><figcaption></figcaption></figure>

### Show or hide with Visibility (conditional logic)

Show or hide the Phone Field based on another option - for example, only show it when the customer answers "Yes" to "Would you like a call before delivery?". Available on the **Advanced** plan and above. See [How to set up Conditional logics?](https://docs.optis.me/product-options/advanced-setup/how-to-set-up-conditional-logics.md).

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FkMo3UqZyphaWIFV4OS6U%2Fimage.png?alt=media&amp;token=f2fe308f-9903-4b81-94c7-be1a7d007436" alt=""><figcaption></figcaption></figure>

### Option width

In the **Display** tab, set **Option width** (**25%**, **33%**, **50%**, **67%**, **75%** or **100%**) to control how much horizontal space the Phone Field takes.

<figure><img src="https://1821185975-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRFiuDpHWm2HwzxPH4lfM%2Fuploads%2FTzm0SEphhTO1LDdPQjtK%2Fimage.png?alt=media&amp;token=60dbd476-5a0e-4b3d-840a-a99b992a75eb" alt=""><figcaption></figcaption></figure>

## Related guides

* [Email Field](https://docs.optis.me/product-options/20-option-types/text-input/email-field.md)
* [Text box](https://docs.optis.me/product-options/20-option-types/text-input/text-box.md)
* [Export and Import Option Sets](https://docs.optis.me/product-options/advanced-setup/export-and-import-option-sets.md) - Phone settings are exported in the **Phone\_settings** column.
* [How to set up Conditional logics?](https://docs.optis.me/product-options/advanced-setup/how-to-set-up-conditional-logics.md)
