Gravity Forms is fantastic tool for collecting names, email address and postal addresses. However, GravityForms is a US plugin, so the default form labels are all US or Canada-centric. Here’s a simple tweak that you can add to functions.php to make your custom address form show UK-labels for addresses.
By default, Gravity Forms will show:
- State / Province / Region
- Zip / Postal Code
Which is fine, but for UK-only websites, we’d like to be a little more British. So if you copy the following snippet of code into your template functions.php, you’ll end up with much more UK-centric labels for your address entry on your Gravity Forms.
/**
* Function to make the address fields GravityForms more British.
*/
function customiseFormLabels($addressTypes, $formID)
{
$addressTypes['international']['zip_label'] = 'Post Code';
$addressTypes['international']['state_label'] = 'County';
return $addressTypes;
}
// Use this one to change all gravity address forms to be more British
add_filter('gform_address_types', 'customiseFormLabels', 10, 2);
// To only change the labels for Form ID = 2, use the following instead.
// Note that the form ID goes after gform_address_types as gform_address_types_ID
//add_filter('gform_address_types_2', 'customiseFormLabels', 10, 2);
Instead, you’ll get the following:
- County
- Post Code
Much more British. You may now sing the National Anthem. :)




Nice tip Dan :) Thanks for sharing.
Thanks David. A client asked me to sort it out recently, and I thought others would like to know too. :)
Dan
Hi Dan
Just found this tip, very good timing as I have just bought GF for a Northampton client of mine.
Great site BTW, thank you for your great tips, hae just started a new WordPress user group here in Milton Keynes and would like to share these if its OK with you guys?
Cheers for now.
@Mark
Glad you find it useful. No probs to share these tips with your group, but please do share the blog URLs, rather than just copying the tips. Thanks!
Dan
Hi Dan,
The main issue I’m having is validating the postcode field. Do you know whether this is possible?
Hi Jon, there’s definitely a way to do it (read http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_validation%22_Hook) but I’ve not currently got the time to write the code.
Sadly, as GF doesn’t give fields names (just numbers), any validation code would be specific to each form, rather than generic.
Dan
Lifesaver, just what I needed, thanks.