Home › Forums › General Issues › Checking several checkboxes from "update_field" › Reply To: Checking several checkboxes from "update_field"
Another problem I see that I have is a true/false field.
This is my true/false field in back-end:
<input type="checkbox" id="acf-field_630c9cc60008a-field_630c9fcb225c0" name="acf[field_630c9cc60008a][field_630c9fcb225c0]" value="1" class="" autocomplete="off">
What name should I use here when I see 2 acf field values in name.
This does not seem to work:
update_field('field_630c9cc60008a', 1, $postID);
I have tried all the names in the field. I have tried with:
update_field('field_630c9cc60008a', 1, $postID);
update_field('field_630c9cc60008a', "1", $postID);
update_field('field_630c9cc60008a', true, $postID);
But nothing works. It will not change at all.
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.