Home › Forums › General Issues › Select field has no "label" or "value" › Reply To: Select field has no "label" or "value"
Hi @turtlemimi
There are a few issues with your code. Because the field is infact a sub field, you need to use the function get_sub_field_object:
http://www.advancedcustomfields.com/resources/functions/get_sub_field_object/
To use that function you need to change your foreach loop to a while( has_sub_field ) loop.
The other issue with your code is that you are sending through the sub field value as the parameter to the get_sub_field function. You need to pass through the field_name, as per the docs
Thanks
E
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.