You are here

function hook_addressfield_address_formats_alter in Address Field 7

Allows modules to alter the predefined address formats.

Parameters

$address_formats: The array of all predefined address formats.

See also

addressfield_get_address_format()

1 invocation of hook_addressfield_address_formats_alter()
addressfield_get_address_format in ./addressfield.address_formats.inc
Returns the address format for the given country code.

File

./addressfield.api.php, line 73
API documentation for Addressfield.

Code

function hook_addressfield_address_formats_alter(&$address_formats) {

  // Remove the postal_code from the list of required fields for China.
  $address_formats['CN']['required_fields'] = array(
    'locality',
    'administrative_area',
  );
}