Home › Forums › Backend Issues (wp-admin) › Opt group in select field works, but only returns value but no label › Reply To: Opt group in select field works, but only returns value but no label
Hi @balint
Please keep in mind that get_field()
function won’t load the field object, so the acf/load_field
hook won’t be working. In this case, kindly use the get_field_object() function instead. This page should give you more idea about it (under the Display value and label section): https://www.advancedcustomfields.com/resources/select/.
I hope this helps 🙂
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.