Home › Forums › ACF PRO › update field is updating value in database but on the frontend › Reply To: update field is updating value in database but on the frontend
When using update_field() you must supply the actual value that ACF stores. For example the documentation shows how to update a checkbox field with an array. In the case of fields types like a post object field, ACF stores the ID of that post object and not the actual post object. So if you are supplying the entire post object in the updated then ACF does not know what to do with it, or it is attempting to update the value and failing.
I’m asking you what the value of $team_code is because I can’t tell this by looking at your code. I haven’t got a clue what $team_code = rgar( $entry, '10' );
does.
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.