Beee4life / acf-city-selector

An ACF extension to create a new field type, where you can select a city based on country and provence/state.
38 stars 15 forks source link

Ability to save country only #56

Closed Akots closed 4 years ago

Akots commented 4 years ago

We have cases on the project where user needs just select a country. Currently if select a country, do not select a city and then click save, country is not saving.

Also in case if just to show country field only and save it is not saving results.

WordPress 5.4.2 ACF PRO 5.8.9

Beee4life commented 4 years ago

That is correct. It's called a City selector, not a Country selector. A country selector is nothing more than a static list of countries. You can create that yourself easily in 5 minutes.

Akots commented 4 years ago

Thank you for respond, Beee4life. Probably there are one thing is missed, it is possible to select to show just a country in the options, but this variant is not helpful if data is not saving after all.

It will be much better to use one plugin for both to select city or just a country, because final case to have ability to select location. In some cases like in user sign up you need just a country select.

Thank you for such plugin.

Beee4life commented 4 years ago

Oh snap, i forgot about that option :)

I will try to look if I can find some time to look into it.... no promises yet...

Beee4life commented 4 years ago

I found the issue, it's merely a typo. You can fix it (temporarily) by changing all instances of $fields to $field in this function.

I'll release an update later tonight.

Beee4life commented 4 years ago

Should be fixed now in this release.

Akots commented 4 years ago

Thanks @Beee4life