The gform_default_address_type filter can be used to override the default address type for new fields. It can be used together with the gform_address_types filter to add support for new country specific address types.


The base filter which would run for all forms would be used like so:

add_filter( 'gform_default_address_type', 'your_function_name', 10, 2 );

To target a specific form append the form id to the hook name. (format: gform_default_address_type_FORMID)

add_filter( 'gform_default_address_type_5', 'your_function_name', 10, 2 );


  • $default_address_type string

    The default address type, international.

  • $form_id integer

    The current form ID


1. Australia

This example shows how the default address type can be set to Australia, The Australian address type would need to have been added by the gform_address_types filter.

add_filter( 'gform_default_address_type', function ( $default_address_type, $form_id ) {
	return 'australia';
}, 10, 2 );


This code should be placed in the functions.php file of your active theme.


This filter was added in Gravity Forms

Source Code

This filter is located in GF_Field_Address::get_default_address_type() in includes/fields/class-gf-field-address.php