<html lang="pt-br" dir="ltr"><head></head><body>### [Customizing the State Field for the United Kingdom in the International Address Scheme](https://wpforms.com/developers/customizing-the-state-field-for-the-united-kingdom-in-the-international-address-scheme/)

**Published:** April 20, 2026
**Author:** Umair Majeed

**Content:**

Would you like to customize how the State/Province/Region field behaves when a user selects the United Kingdom in your Address field? When using the International scheme, WPForms hides the State/Province/Region field by default for the United Kingdom, since the UK doesn’t use states in the traditional sense. If you’d like to collect a value such as the country (England, Scotland, Wales, or Northern Ireland) or county instead, you can do that with a custom code snippet.

This tutorial will show you how to re-enable the State/Province/Region field for the United Kingdom, change its label, and replace the text input with a dropdown of UK countries.

---

## Creating the Snippet

Before we get started, be sure to check out our tutorial on how to [add custom code snippets](https://wpforms.com/developers/how-to-add-custom-php-or-javascript-for-wpforms/#using-wpcode-plugin-recommended) to your site.

This snippet does two things. First, it removes the United Kingdom from the list of countries that hide the State/Province/Region field. Second, it adds a small piece of JavaScript to the frontend that updates the field’s label and replaces the text input with a dropdown whenever the user selects the United Kingdom.

Go ahead and add the following snippet to your site.

```

/**
 * Customize the Address field State/Province/Region input when
 * the United Kingdom is selected in the International scheme.
 *
 * @link https://wpforms.com/developers/customizing-the-state-field-for-the-united-kingdom-in-the-international-address-scheme
 */

add_filter( 'wpforms_forms_fields_address_frontend_strings_list_countries_without_states', 'wpf_forms_fields_address_frontend_strings_list_countries_without_states' );

function wpf_forms_fields_address_frontend_strings_list_countries_without_states( $countries ) {

	return array_diff( $countries, [ 'GB' ] );
}

add_action( 'wpforms_frontend_js', 'wpf_forms_fields_address_frontend_great_britain_countries_list' );
function wpf_forms_fields_address_frontend_great_britain_countries_list( $forms) {
	$load = false;

	foreach ( $forms as $form ) {
		if ( wpforms_has_field_type( 'address', $form ) ) {
			$load = true;

			break;
		}
	}

	if ( ! $load ) {
		return;
	}

	?&gt;

**Categories:** Tutorials, Fields

---

</body></html>