8manos / wc-city-select

City Select for WooCommerce. Show a dropdown select as the cities input.
https://wordpress.org/plugins/wc-city-select/
33 stars 41 forks source link

Option to combine city and state #49

Open securevault opened 2 years ago

securevault commented 2 years ago

The basic rule for form conversion rate is to have as few field as possible.

For some countries with few city selection we can just show the city field, hiding the state field.

This is how it works in the background: -) we hide the original woocommerce's city and state fields -) we will create a new field called city_state which will list all the cities for the current country. -) after user select the city, we update the hidden woocommerce's city and state fields

erikdemarco commented 2 years ago

Nice idea.

This can be applied to all countries even with those which have big list of cities without affecting performance.

We just need to call Ajax when user starts typing and return all cities in that country which starts with that words. Just to make sure we need to return the shortest length first just in case the city name is short

Mantish commented 2 years ago

hi, sorry for the very late reply. I agree it's a nice idea. Thanks! I won't be able to implement this myself but I'll be happy to review any PRs about this