Last active
March 3, 2018 03:31
-
-
Save braddalton/6210310 to your computer and use it in GitHub Desktop.
Add Brazil Address Type Code For Gravity Forms https://wpsites.net/web-design/add-country-specific-address-code-to-gravity-forms-address-fields-for-aus-u-k/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter("gform_address_types", "brazilian_address", 10, 2); | |
function brazilian_address($address_types, $form_id){ | |
$address_types["brazil"] = array( | |
"label" => "Brasil", | |
"country" => "Brasil", | |
"zip_label" => "CEP", | |
"state_label" => "Estado", | |
"states" => array("", "Acre", "Alagoas", "Amapa", "Amazonas","Bahia", "Ceara", "Distrito Federal", "Espirito Santo", "Goias", "Maranhao", "Mato Grosso", "Mato Grosso do Sul", "Minas Gerais", "Para", "Paraiba", "Parana", "Pernambuco", "Piaui", "Roraima", "Rondonia", "Rio de Janeiro", "Rio Grande do Norte", "Rio Grande do Sul", "Santa Catarina", "Sao Paulo", "Sergipe", "Tocantins") | |
); | |
return $address_types; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment