PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Remove zip code from address field?

  1. Title pretty much explains it all, I want to remove Zip code from my form. Can I do this?

    Posted 12 years ago on Tuesday June 7, 2011 | Permalink
  2. I also would like to do this, can someone tell us how?!

    "Postcode" all the way ;D

    Bklahrke

    Posted 12 years ago on Thursday June 16, 2011 | Permalink
  3. Currently you cannot remove the zip/postal code field from the Address field. The Address Field is a helper field, if you don't like what it does you have 2 options.

    1) Use Standard Fields instead of the Address Field

    2) Create your own custom Address Field type using a hook which lets you create your own custom Address Field and determine which fields are displayed. Documentation for this hook can be found here:

    http://www.gravityhelp.com/documentation/page/Gform_address_types

    Posted 12 years ago on Thursday June 16, 2011 | Permalink
  4. Michael Atkins
    Member

    I found this really useful, Thanks Carl. Using the Brazil option as a template, I have created a UK-specific address option with "post code instead of "zip" and a drop-down list for "County" to replace "State".

    The icing on the cake would be to add another line to the function rename the "City" Field to "Town". Is that possible?

    Posted 12 years ago on Sunday June 19, 2011 | Permalink
  5. You can use the sublabel filter to rename "City" to "Town".
    The following page should have what you need.
    http://www.gravityhelp.com/documentation/page/Gform_address_city#Examples

    Posted 12 years ago on Monday June 20, 2011 | Permalink
  6. Michael Atkins
    Member

    Thanks Alex - I'd missed that. I've just tried it & it works like a charm :o)

    Posted 12 years ago on Monday June 20, 2011 | Permalink
  7. lerizzle
    Member

    A great code example would be recreating keeping everything as is and simply removing the zip using that filter.

    Posted 12 years ago on Thursday January 26, 2012 | Permalink