• Skip to primary navigation
  • Skip to main content

GravityWP

The best information about Gravity Forms, GravityView, Gravity Flow and other addons

  • Tutorials
  • Forms
  • Views
  • Workflow
  • PDF
  • Perks
  • Show Search
Hide Search
Jurriaan Koops

Zip-code before City in Gravity Forms (order of address field)

Jurriaan Koops · Mar 6, 2018 ·

Do you want to change the order of the Gravity Forms Address field items? Especially to put the ZIP-code before the City (as is usual in Germany and the Netherlands for example)? Here you find the easiest way.

Buy Gravity Forms (affiliate link)
  1. How to change the ZIP-code field location in your Gravity Form

How to change the ZIP-code field location in your Gravity Form

Copy this code in your functions.php in your theme directory and the zip-code will show before the City instead of after it.
add_filter( 'gform_address_display_format', 'address_format' );
function address_format( $format ) {
    return 'zip_before_city';
}
Buy Gravity Forms (affiliate link)

Gravity Forms

© 2021 - This website is made possible by the wonderful services of
WordPress, GravityForms, GravityView, GravityWiz, Genesis Framework & WP Engine

  • About
  • Hire GF developers
  • Charts
  • Cheat Sheet