Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Country is effectively a required field. #8

Closed
dotancohen opened this issue Nov 8, 2017 · 6 comments
Closed

Country is effectively a required field. #8

dotancohen opened this issue Nov 8, 2017 · 6 comments

Comments

@dotancohen
Copy link

There seems to be no way to have county be not required. Even setting the required field to 0 and the default_value field to an empty string will have ACF Country use the first country (Afganistan in English) as the default.

@nlemoine
Copy link
Owner

nlemoine commented Nov 9, 2017

Should be fixed now.

@nlemoine nlemoine reopened this Nov 9, 2017
@nlemoine nlemoine closed this as completed Nov 9, 2017
@dotancohen
Copy link
Author

Thank you!

dotancohen added a commit to dotancohen/acf-country that referenced this issue Dec 17, 2017
@dotancohen
Copy link
Author

The current fix does not resolve the issue. A NULL country (empty ) must be prepended to the list to resolve the issue.

@dotancohen
Copy link
Author

See pull request with tested fix:
#9

@nlemoine
Copy link
Owner

The fix does work for me. The empty option is added here: https://github.com/nlemoine/acf-country/blob/master/fields/acf-country-helpers.php#L62-L64

Tested with with native select and select2.

Could you tell me more about your field options?

@trantin2310
Copy link

the empty option not working for me after you fixed.

please check with screenshot and i will you login website detail for you checking.
login:
http://122.201.118.65/~pickadevelop/wp-admin/
username: admin
password: admin

check image link
https://www.awesomescreenshot.com/image/3115175/51ec6fa8dad0f5043b5b4894202dc3cd
check product link with country file called country_selling
http://122.201.118.65/~pickadevelop/wp-admin/post.php?post=96696&action=edit

hope you will help me solve soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants