Home › Forums › Backend Issues (wp-admin) › Edit checkbox selection – update_field() › Reply To: Edit checkbox selection – update_field()
The value your including in the call to update_field in incorrect then. What you have there is the field settings for the entire field. Look at the documentation for update_field here https://www.advancedcustomfields.com/resources/update_field/
What you want will look something like this
update_field('field_0123456789', array(1,2,5), $post_id);
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.