Skip to main content

Phone number field

What it does​

Add a phone number field to the price request form, so your team can call the customer back. The customer picks their country from a list with flags, and the dialling code is added for them. You set it up in Stores → Configuration → MageMe Extensions → HidePrice, in Price Request Form → Phone Number.

Before you start​

Steps​

Turn on the phone field​

  1. Go to Stores → Configuration → MageMe Extensions → HidePrice.

  2. Expand Price Request Form, then Phone Number.

  3. In Enable Phone Number Input, select Yes. The other settings of the group appear.

  4. If the customer must enter a phone number to send the request, in Required, select Yes.

  5. In Initial Country, select the country the field starts with. See Initial country below.

    Phone Number settings with Enable Phone Number Input, Required and Initial Country
  6. In Preferred Countries, select the countries to show at the top of the list, for example the countries most of your customers come from.

  7. To let customers pick only some countries, select them in Limit Country Selection. To allow every country, leave it empty.

  8. In Comment, enter a text to show under the field, for example "We only call during business hours." Leave it empty for no text.

  9. Click Save Config.

To pick more than one country in a list, hold Ctrl (Cmd on a Mac) while you click.

The place of the field in the form is set in Fields Order. See Change the order of the fields. Every setting of this group is also listed in the Phone Number settings reference.

Initial country​

Initial Country is the country the field shows when the form opens. The customer can still pick another one.

  • Auto (the default): the field guesses the country from the visitor's IP address.
  • A country: the field always starts with that country.

Privacy note. On Auto, the visitor's browser asks the service ipinfo.io for the visitor's country when the request form opens, before anything is sent. ipinfo.io sees the visitor's IP address. To avoid this, select a fixed country. See Privacy and personal data.

How the phone number is shown​

The phone number is saved in international format, with the country code and without spaces, for example +12015550123, also when the customer typed it with spaces. The grid, the request page, the request emails and exports show it that way. In a CSV export, the cell has a space before the number.

What you should see​

  • The form has a phone field with a flag and a country list.

  • The list starts with your preferred countries and, if you limited it, shows only the countries you selected.

    Phone number field with the country list open
  • With Required set to Yes, the form isn't sent without a phone number and shows a message under the field: "This is a required field." on Luma, "Phone Number field is required." on Hyvä.

Limits​

  • The settings work per store view.
  • Preferred Countries, Limit Country Selection and Initial Country list the countries in Allow Countries of the default configuration (Stores → Configuration → General → Country Options), whatever scope you edit. Without a limit, the field on the storefront offers every country.

Troubleshooting​

  • The phone field doesn't show. Check that Enable Phone Number Input is Yes for the store view, and refresh the invalidated caches in System → Tools → Cache Management.
  • The field starts with the wrong country. On Auto, the guess depends on the visitor's network, for example a VPN. Select a fixed country in Initial Country.

What's next​

Last reviewed November 28, 2026