<html lang="pt-br" dir="ltr"><head></head><body>### [wpforms_address_schemes](https://wpforms.com/developers/wpforms_address_schemes/)

**Published:** February 21, 2020
**Author:** Editorial Team

**Excerpt:** The wpforms_address_schemes  filter is used to populate the <strong>Address</strong> form field <strong>Scheme</strong> inside the form builder.


**Content:**

## Description

The `wpforms_address_schemes` filter is used to populate the **Address** form field **Scheme** inside the form builder.

## Parameters

$schemes*(array) (Required)* Determines what **Schemes** will populate in the **Address** form field dropdown selection.## Source

`wpforms/pro/includes/fields/class-address.php`

## More Information

The `wpforms_address_schemes` filter is applied to the **Scheme** dropdown on the **Address** form field inside the form builder. You can easily create your own **Address Scheme** for your specific needs.

## Example

```

/**
 * Using the 
 *
 * @link https://wpforms.com/developers/wpforms_address_schemes
 * 
 * @param  array $schemes   List of address schemes.  
 *
 * @return array
 */

function wpf_dev_new_address_scheme( $schemes ) {

    $schemes[ 'custom' ] = array(
        'label'          =&gt; 'Custom',
        'address1_label' =&gt; 'Address Line 1',
        'address2_label' =&gt; 'Address Line 2',
        'city_label'     =&gt; 'City',
        'postal_label'   =&gt; 'Postal Code',
        'state_label'    =&gt; 'State / Province / Region',
        'states'         =&gt; '',
        'countries'      =&gt; array(
            'AF' =&gt; 'Afghanistan',
            'AX' =&gt; 'Aland Islands',
            'AL' =&gt; 'Albania',
            'DZ' =&gt; 'Algeria',
            'AS' =&gt; 'American Samoa',
            'AD' =&gt; 'Andorra',
            'AO' =&gt; 'Angola',
            'AI' =&gt; 'Anguilla',
            'AQ' =&gt; 'Antarctica',
            'AG' =&gt; 'Antigua and Barbuda',
            'AR' =&gt; 'Argentina',
            'AM' =&gt; 'Armenia',
            'AW' =&gt; 'Aruba',
            'AC' =&gt; 'Ascension Island',
            'AU' =&gt; 'Australia',
            'AT' =&gt; 'Austria',
            'AZ' =&gt; 'Azerbaijan',
            'BS' =&gt; 'Bahamas',
            'BH' =&gt; 'Bahrain',
            'BD' =&gt; 'Bangladesh',
            'BB' =&gt; 'Barbados',
            'BY' =&gt; 'Belarus',
            'BE' =&gt; 'Belgium',
            'BZ' =&gt; 'Belize',
            'BJ' =&gt; 'Benin',
            'BM' =&gt; 'Bermuda',
            'BT' =&gt; 'Bhutan',
            'BO' =&gt; 'Bolivia',
            'BA' =&gt; 'Bosnia and Herzegovina',
            'BW' =&gt; 'Botswana',
            'BV' =&gt; 'Bouvet Island',
            'BR' =&gt; 'Brazil',
            'IO' =&gt; 'British Indian Ocean Territory',
            'VG' =&gt; 'British Virgin Islands',
            'BN' =&gt; 'Brunei',
            'BG' =&gt; 'Bulgaria',
            'BF' =&gt; 'Burkina Faso',
            'BI' =&gt; 'Burundi',
            'KH' =&gt; 'Cambodia',
            'CM' =&gt; 'Cameroon',
            'CA' =&gt; 'Canada',
            'IC' =&gt; 'Canary Islands',
            'CV' =&gt; 'Cape Verde',
            'BQ' =&gt; 'Caribbean Netherlands',
            'KY' =&gt; 'Cayman Islands',
            'CF' =&gt; 'Central African Republic',
            'EA' =&gt; 'Ceuta and Melilla',
            'TD' =&gt; 'Chad',
            'CL' =&gt; 'Chile',
            'CN' =&gt; 'China',
            'CX' =&gt; 'Christmas Island',
            'CP' =&gt; 'Clipperton Island',
            'CC' =&gt; 'Cocos (Keeling) Islands',
            'CO' =&gt; 'Colombia',
            'KM' =&gt; 'Comoros',
            'CD' =&gt; 'Congo (DRC)',
            'CG' =&gt; 'Congo (Republic)',
            'CK' =&gt; 'Cook Islands',
            'CR' =&gt; 'Costa Rica',
            'CI' =&gt; 'Côte d’Ivoire',
            'HR' =&gt; 'Croatia',
            'CU' =&gt; 'Cuba',
            'CW' =&gt; 'Curaçao',
            'CY' =&gt; 'Cyprus',
            'CZ' =&gt; 'Czech Republic',
            'DK' =&gt; 'Denmark (Danmark)',
            'DG' =&gt; 'Diego Garcia',
            'DJ' =&gt; 'Djibouti',
            'DM' =&gt; 'Dominica',
            'DO' =&gt; 'Dominican Republic',
            'EC' =&gt; 'Ecuador',
            'EG' =&gt; 'Egypt',
            'SV' =&gt; 'El Salvador',
            'GQ' =&gt; 'Equatorial Guinea',
            'ER' =&gt; 'Eritrea',
            'EE' =&gt; 'Estonia',
            'ET' =&gt; 'Ethiopia',
            'FK' =&gt; 'Falkland Islands',
            'FO' =&gt; 'Faroe Islands',
            'FJ' =&gt; 'Fiji',
            'FI' =&gt; 'Finland',
            'FR' =&gt; 'France',
            'GF' =&gt; 'French Guiana',
            'PF' =&gt; 'French Polynesia',
            'TF' =&gt; 'French Southern Territories',
            'GA' =&gt; 'Gabon',
            'GM' =&gt; 'Gambia',
            'GE' =&gt; 'Georgia',
            'DE' =&gt; 'Germany',
            'GH' =&gt; 'Ghana',
            'GI' =&gt; 'Gibraltar',
            'GR' =&gt; 'Greece',
            'GL' =&gt; 'Greenland',
            'GD' =&gt; 'Grenada',
            'GP' =&gt; 'Guadeloupe',
            'GU' =&gt; 'Guam',
            'GT' =&gt; 'Guatemala',
            'GG' =&gt; 'Guernsey',
            'GN' =&gt; 'Guinea',
            'GW' =&gt; 'Guinea-Bissau',
            'GY' =&gt; 'Guyana',
            'HT' =&gt; 'Haiti',
            'HM' =&gt; 'Heard &amp; McDonald Islands',
            'HN' =&gt; 'Honduras',
            'HK' =&gt; 'Hong Kong',
            'HU' =&gt; 'Hungary',
            'IS' =&gt; 'Iceland',
            'IN' =&gt; 'India',
            'ID' =&gt; 'Indonesia',
            'IR' =&gt; 'Iran',
            'IQ' =&gt; 'Iraq',
            'IE' =&gt; 'Ireland',
            'IM' =&gt; 'Isle of Man',
            'IL' =&gt; 'Israel',
            'IT' =&gt; 'Italy',
            'JM' =&gt; 'Jamaica',
            'JP' =&gt; 'Japan',
            'JE' =&gt; 'Jersey',
            'JO' =&gt; 'Jordan',
            'KZ' =&gt; 'Kazakhstan',
            'KE' =&gt; 'Kenya',
            'KI' =&gt; 'Kiribati',
            'XK' =&gt; 'Kosovo',
            'KW' =&gt; 'Kuwait',
            'KG' =&gt; 'Kyrgyzstan',
            'LA' =&gt; 'Laos',
            'LV' =&gt; 'Latvia',
            'LB' =&gt; 'Lebanon',
            'LS' =&gt; 'Lesotho',
            'LR' =&gt; 'Liberia',
            'LY' =&gt; 'Libya',
            'LI' =&gt; 'Liechtenstein',
            'LT' =&gt; 'Lithuania',
            'LU' =&gt; 'Luxembourg',
            'MO' =&gt; 'Macau',
            'MK' =&gt; 'Macedonia (FYROM)',
            'MG' =&gt; 'Madagascar',
            'MW' =&gt; 'Malawi',
            'MY' =&gt; 'Malaysia',
            'MV' =&gt; 'Maldives',
            'ML' =&gt; 'Mali',
            'MT' =&gt; 'Malta',
            'MH' =&gt; 'Marshall Islands',
            'MQ' =&gt; 'Martinique',
            'MR' =&gt; 'Mauritania',
            'MU' =&gt; 'Mauritius',
            'YT' =&gt; 'Mayotte',
            'MX' =&gt; 'Mexico',
            'FM' =&gt; 'Micronesia',
            'MD' =&gt; 'Moldova',
            'MC' =&gt; 'Monaco',
            'MN' =&gt; 'Mongolia',
            'ME' =&gt; 'Montenegro',
            'MS' =&gt; 'Montserrat',
            'MA' =&gt; 'Morocco',
            'MZ' =&gt; 'Mozambique',
            'MM' =&gt; 'Myanmar',
            'NA' =&gt; 'Namibia',
            'NR' =&gt; 'Nauru',
            'NP' =&gt; 'Nepal',
            'NL' =&gt; 'Netherlands',
            'NC' =&gt; 'New Caledonia',
            'NZ' =&gt; 'New Zealand',
            'NI' =&gt; 'Nicaragua',
            'NE' =&gt; 'Niger',
            'NG' =&gt; 'Nigeria',
            'NU' =&gt; 'Niue',
            'NF' =&gt; 'Norfolk Island',
            'MP' =&gt; 'Northern Mariana Islands',
            'KP' =&gt; 'North Korea',
            'NO' =&gt; 'Norway',
            'OM' =&gt; 'Oman',
            'PK' =&gt; 'Pakistan',
            'PW' =&gt; 'Palau',
            'PS' =&gt; 'Palestine',
            'PA' =&gt; 'Panama',
            'PG' =&gt; 'Papua New Guinea',
            'PY' =&gt; 'Paraguay',
            'PE' =&gt; 'Peru',
            'PH' =&gt; 'Philippines',
            'PN' =&gt; 'Pitcairn Islands',
            'PL' =&gt; 'Poland',
            'PT' =&gt; 'Portugal',
            'PR' =&gt; 'Puerto Rico',
            'QA' =&gt; 'Qatar',
            'RE' =&gt; 'Réunion',
            'RO' =&gt; 'Romania',
            'RU' =&gt; 'Russia',
            'RW' =&gt; 'Rwanda',
            'BL' =&gt; 'Saint Barthélemy',
            'SH' =&gt; 'Saint Helena',
            'KN' =&gt; 'Saint Kitts and Nevis',
            'LC' =&gt; 'Saint Lucia',
            'MF' =&gt; 'Saint Martin',
            'PM' =&gt; 'Saint Pierre and Miquelon',
            'WS' =&gt; 'Samoa',
            'SM' =&gt; 'San Marino',
            'ST' =&gt; 'São Tomé and Príncipe',
            'SA' =&gt; 'Saudi Arabia',
            'SN' =&gt; 'Senegal',
            'RS' =&gt; 'Serbia',
            'SC' =&gt; 'Seychelles',
            'SL' =&gt; 'Sierra Leone',
            'SG' =&gt; 'Singapore',
            'SX' =&gt; 'Sint Maarten',
            'SK' =&gt; 'Slovakia',
            'SI' =&gt; 'Slovenia',
            'SB' =&gt; 'Solomon Islands',
            'SO' =&gt; 'Somalia',
            'ZA' =&gt; 'South Africa',
            'GS' =&gt; 'South Georgia &amp; South Sandwich Islands',
            'KR' =&gt; 'South Korea',
            'SS' =&gt; 'South Sudan',
            'ES' =&gt; 'Spain',
            'LK' =&gt; 'Sri Lanka',
            'VC' =&gt; 'St. Vincent &amp; Grenadines',
            'SD' =&gt; 'Sudan',
            'SR' =&gt; 'Suriname',
            'SJ' =&gt; 'Svalbard and Jan Mayen',
            'SZ' =&gt; 'Swaziland',
            'SE' =&gt; 'Sweden',
            'CH' =&gt; 'Switzerland',
            'SY' =&gt; 'Syria',
            'TW' =&gt; 'Taiwan, Province of China',
            'TJ' =&gt; 'Tajikistan',
            'TZ' =&gt; 'Tanzania',
            'TH' =&gt; 'Thailand',
            'TL' =&gt; 'Timor-Leste',
            'TG' =&gt; 'Togo',
            'TK' =&gt; 'Tokelau',
            'TO' =&gt; 'Tonga',
            'TT' =&gt; 'Trinidad and Tobago',
            'TA' =&gt; 'Tristan da Cunha',
            'TN' =&gt; 'Tunisia',
            'TR' =&gt; 'Turkey',
            'TM' =&gt; 'Turkmenistan',
            'TC' =&gt; 'Turks and Caicos Islands',
            'TV' =&gt; 'Tuvalu',
            'UM' =&gt; 'U.S. Outlying Islands',
            'VI' =&gt; 'U.S. Virgin Islands',
            'UG' =&gt; 'Uganda',
            'UA' =&gt; 'Ukraine',
            'AE' =&gt; 'United Arab Emirates',
            'GB' =&gt; 'United Kingdom',
            'US' =&gt; 'United States of America',
            'UY' =&gt; 'Uruguay',
            'UZ' =&gt; 'Uzbekistan',
            'VU' =&gt; 'Vanuatu',
            'VA' =&gt; 'Vatican City',
            'VE' =&gt; 'Venezuela',
            'VN' =&gt; 'Vietnam',
            'WF' =&gt; 'Wallis and Futuna',
            'EH' =&gt; 'Western Sahara',
            'YE' =&gt; 'Yemen',
            'ZM' =&gt; 'Zambia',
            'ZW' =&gt; 'Zimbabwe',
        ),
    );

    return $schemes;

}

add_filter( 'wpforms_address_schemes', 'wpf_dev_new_address_scheme', 10, 1 );
```

## Reference Action

[How to Create Additional Schemes for the Address Field](https://wpforms.com/developers/create-additional-schemes-for-the-address-field/ "How to Create Additional Schemes for the Address Field")

**Categories:** Filters Hooks

**Tags:** PHP

---

</body></html>