I’m making the mother of all web forms to create an online booking system for a client. Needless to say I’m using Gravity Forms* to build it, if for no other reason that it removes ALL the headache from creating forms… you just have to do the painstaking work of adding each field.
In any case, given its North American origins it doesn’t come prebuilt with Australian address options… but they do provide the means to create such things… and because I’m such a sweetheart, I’m sharing the code here… so you can use it and so that I don’t have to write it again…
Paste this into your functions.php or your functionality plugin.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
// Gravity Forms Custom Addresses (Australia) add_filter('gform_address_types', 'australian_address', 10, 2); 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; } |
There you go, have at it!
*Yes, this is an affiliate link. I am part of a number of affiliate programs, but you can be assured that if I’m using affiliate links on a given product/service that it has my wholehearted support and I’m talking about it because I want to share the love, and if that makes me a little cash on the side, yay. If not, it’s still a great product.

Dee, I’d be curious to know if it was possible to get a link to the booking system you created with Gravity Forms. I’d like to see the client side functionality to get an idea how you structured the form.
Sure thing. http://oxygenfactory.com.au/booking-form/