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.
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.