Home › Forums › General Issues › gettings values from a select › Reply To: gettings values from a select
$field = get_field_object('domaine_de_formation');
$choices = $field['choices'];
if get_field_object(‘domaine_de_formation’) is returning false then ACF does not know what post you’re trying to get the fields from, or there are no values set for the current post. ACF cannot get the field object using the field name if values are not set for the current post or acf cannot determine what the current post is.
I will need some more context on exactly how/where/when you are attempting to use this function.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.