Home › Forums › General Issues › Total Number of Checkboxes Checked › Reply To: Total Number of Checkboxes Checked
I must have missed you OP.
The reason it is failing is that you are probably calling get_field() for a field without a value, as you have seen your updated code, you must check that the field is actually an array before you try to count it.
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.