WP Manifestindependent plugin directory
manifest / forms / gf-city-and-state-auto-fill

Gravity Forms - City and State Auto-fill

Gravity Forms Addon to populate City and State form entered Zip Code

★ 2stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/jeradin/gf-city-and-state-auto-fill/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Gravity Forms - City and State Auto-fill add-on

Description

This Gravity Forms AddOn adds a setting to the address field to allow the City and State to be dynamically populated from enter a 5 digit zip code for the United States or a 6 digit Zip Code for Canada.

This is an add-on for the Gravity Forms WordPress plugin and will not provide any functionality to WordPress unless Gravity Forms is installed and activated.

Source Repository on GitHub

https://github.com/Jeradin/gf-city-and-state-auto-fill

Bugs, Questions or Suggestions

https://github.com/Jeradin/gf-city-and-state-auto-fill/issues

Notes

  1. I need to test in all browsers for errors still.

  2. This only works for the US and Canada currently. please select one of these as the "Address Type" general settings for the Address Field.

  3. Some 5 digit zip codes don't bring up the correct city: http://semaphorecorp.com/cgi/zip5.html a. API only allows for 5 digits

Installation

The Website Field plugin needs to be added to your themes.

1. Download the zip file and upload as any Wordpress plugin.

How to Use

Add an address field type to your form, make sure to change the "Address Type" to either United States or Canada, than go to the advanced tab and check the box that says "Populate by ZIP code"

Now when you view your form on the front end the City/State will be hidden until the user enters a ZIP code.

Frequently Asked Questions

I've activated the plugin, but nothing happens!

Make sure you have Gravity Forms installed and activated. This is not a standalone plugin for WordPress, it only adds additional functionality to Gravity Forms.

Future Enhancements

  1. Add more countries with Postal Codes and validation. http://bootstrapvalidator.com/validators/zipCode/
  2. Validation the field live http://www.zippopotam.us/static/sample_us.html

Screenshots

  1. Field Advanced settings.

Changelog

1.0

  • Initial Release