Home › Forums › Backend Issues (wp-admin) › Dynamically Load Select Choices with Functions › Reply To: Dynamically Load Select Choices with Functions
Your code is showing in incorrect use of the $field variable.
This variable is not just for choices, it is for many pther things such as name / label etc.
You need to be modifying the $field[‘choices’], not $field.
Please let me know if this was not clear in 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.