-
-
Save Bradley-D/c413df2ef7895301da78 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// 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