Developers can customise the behaviour of the plugin through filter hooks. There are some useful filter hooks supported by this plugin, and by Gravity Forms itself.
gf_
address_ enhanced_ countries - array $countries
- return array
Developers can change the map of country names to codes.
gf_
address_ enhanced_ country_ file - string $filepath
- string $country_code
- return string
Developers can add their own country and state/province definitions, overriding those provided in the plugin. See the folder includes/countries/ for examples.
gf_
address_ enhanced_ label_ subdivisions_ default - string $default_label
- return string
Developers can change the default label on state/province subfields.
gf_
address_ enhanced_ layout - string $layout
- int $form_id
- GF_Field $field
Developers can change the Address field layout to put the country subfield first, by returning ‘country_top’ from this filter. Supports hooking for all forms, by form ID, and by form ID and field ID per Gravity Forms conventions.
gf_
address_ enhanced_ required_ subfields - webaware\gf_address_enhanced\RequiredSubfields[] $map
- return webaware\gf_address_enhanced\RequiredSubfields[]
Developers can modify the required subfields by country, altering which countries require a city, state / province, or postal code.
gf_
address_ enhanced_ smart_ states_ countries - array $countries
- return array
Developers can add or remove countries that should be supported for Smart States dropdowns.
gf_
address_ enhanced_ state_ name - string $name
- string $country_code
- string $state_code
- string $original_name
- return string
Developers can change the names displayed for subdivisions (states, provinces).