Skip to main content

Country field

What it does​

A Country field is a dropdown list of countries. You find it in the builder's left panel, in the Store Data group, and add it by dragging it onto the form, as described in Adding fields and sections.

The list starts with "-- Please Select --" and shows the countries your store allows, by name, in the language of the store view. You don't type the countries in: they come from your store's Allow Countries setting, under Stores → Configuration → General → General → Country Options, the same list checkout uses.

When a signed-in customer opens the form, the field already shows the country of their default billing address.

The submission page, the Inbox column and emails show the country's name, for example "United States".

When to use​

  • Use Country when you need to know the visitor's country, for example to send a request to the team that covers it. Add a State field under it when you also need the region.
  • Use an Address field when you need a full postal address. It has its own country part.

Settings​

Go to Content → WebForms → Manage Forms, click the form's name, then click Form Builder. Click the field on the form. Its settings show in the right panel, on the tabs General and Appearance. You'll change these settings most often:

  • Default Country (General tab) chooses a country in advance. A signed-in customer still gets the country of their own billing address.
  • Required makes the visitor choose a country before the form can be sent.

The list in Default Country shows every country Magento knows, not only the allowed ones. Pick one your store allows: visitors only see allowed countries.

The table below lists every setting. Visitors see a change after you click Publish Changes in the builder's top bar.

All settings of this field
Setting Where in the panel Values Translatable
Enable Field General → Basic On or off No
Label (required) General → Basic Text Yes
Field Code General → Basic Text No
Required General → Basic On or off No
Required Error Message General → Basic Text Yes
Help Text General → Basic Formatted text Yes
Tooltip General → Basic Formatted text Yes
Default Country General → Field Settings A list of 249 options No
Hide in Submissions General → Submission Display On or off No
Allow in Staff Email Subject General → Submission Display On or off No
Submission Label General → Submission Display Text Yes
Personal Data General → Privacy By field type — Personal data, Not personal, Personal data No
Desktop Appearance → Layout Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off No
Tablet Appearance → Layout Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off No
Mobile Appearance → Layout Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off No
Show Label Appearance → Style On or off No
Help Text Position Appearance → Style Below input, Above input No
Container Classes Appearance → CSS Text No
Input Classes Appearance → CSS Text No
Custom Attributes Appearance → Advanced Text No
Inline Style Appearance → Advanced Text No

Validation​

Check What the visitor sees
Required "Please select an option." under the list.

The field has no Validation tab.

Logic​

  • Start a rule: no. Although it's a dropdown list, a Country field can't start one. Its Logic tab appears only once a rule shows or hides it, and lists that rule.
  • Show or hide this field: yes. Start the rule on another field that has a Logic tab, such as a Select, and choose this field as the one to show or hide. See Show or hide fields and sections.
  • Email conditions: yes, with Is and Is Not. You pick the country from a list, so a notification can go only to the team that covers that country. See Recipients and conditions.

Limits​

  • By default, a country counts as personal data, because it can help identify a person. Through the Management API and AI assistants the answer is masked. If that's not what you want, set Personal Data to Not personal; this needs the Edit Form permission. See Personal data masking.
  • The list follows Allow Countries. There's no separate list of countries for one form.

Troubleshooting​

  • A country is missing from the list. Check Allow Countries under Stores → Configuration → General → General → Country Options.
  • The State field under it stays a text box. First check that the State field's Country Field names this field. If it does, Magento has no list of states for the chosen country, and the text box is expected. See State field.

What's next​

Applies to WebForms 4Last reviewed November 24, 2026