Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Bradley-D/c413df2ef7895301da78 to your computer and use it in GitHub Desktop.
Save Bradley-D/c413df2ef7895301da78 to your computer and use it in GitHub Desktop.
// Gravity Forms Custom Addresses (Australia)
// Credit: The Web Princess - http://thewebprincess.com/
function australian_address( $address_types, $form_id ) {
$address_types['australia'] = array(
'label' => 'Australia', //labels the dropdown
'country' => 'Australia', //sets Australia as default country
'zip_label' => 'Post Code', //what it says
'state_label' => 'State', //as above
'states' => array(
'',
'Australian Capital Territory',
'New South Wales',
'Northern Territory',
'Queensland',
'South Australia',
'Tasmania', 'Victoria',
'Western Australia'
)
);
return $address_types;
}
add_filter( 'gform_address_types', 'australian_address', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment