Last active
August 29, 2015 14:03
-
-
Save ciaranmahoney/116710356af63cfc6f20 to your computer and use it in GitHub Desktop.
Adding Australian specific address fields to 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
add_filter("gform_address_types", "aus_address", 10, 2); | |
function aus_address($address_types, $form_id) | |
{ | |
$address_types["australia"] = array( | |
"label" => "Australia", | |
"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; | |
} | |
//Modified from http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment