Home › Forums › General Issues › Populate select field with meta values not working. › Reply To: Populate select field with meta values not working.
The above code is in functions.php. To debug, I’ve removed the above code from the function in functions.php and placed into a post template, removing return $field and replacing with print_r($field).
Doing this, I can see that the array is formatted as follows:
Array ( [choices] => Array ( [14thstreetcorridor] => 14th Street Corridor [georgetown] => Georgetown ) )
The values just aren’t making it to the select field, which is located on a custom post type add/create screen via the WP Dashboard.
I’ve tried using both the name and key filter, neither of which is working for me.
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!
© 2022 Advanced Custom Fields.