Home › Forums › Backend Issues (wp-admin) › Dynamically add options to select field and save both value and label › Reply To: Dynamically add options to select field and save both value and label
ACF does not save both the value and the label of values in a select field, it only saves the value. ACF depends on the field settings when returning the label and gets them from the $field[‘choices’] setting. For ACF to return the labels that are different from the values you would need to permanently update the field settings for the field.
In this case you would have to use an acf/format_value filter to change the label returned by ACF.
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.