Created
May 13, 2013 01:57
-
-
Save BronsonQuick/5565726 to your computer and use it in GitHub Desktop.
Adds an Australian formatted Address dropdown to the Address field in Gravity Forms
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
function g8_aus_address( $address_types, $form_id ){ | |
$address_types["australia"] = array( | |
"label" => "Australian", | |
"country" => "Australia", | |
"zip_label" => "Postcode", | |
"state_label" => "State", | |
"states" => array( | |
"NT" => "NT", | |
"ACT" => "ACT", | |
"NSW" => "NSW", | |
"QLD" => "QLD", | |
"VIC" => "VIC", | |
"WA" => "WA", | |
"SA" => "SA", | |
"TAS" => "TAS", | |
) | |
); | |
return $address_types; | |
} | |
add_filter( 'gform_address_types', 'g8_aus_address', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment