Home › Forums › ACF PRO › Display all checkbox options but add class to selected › Reply To: Display all checkbox options but add class to selected
Sorry for constant messages, I’m trying to work on this while I wait on a reply.
Ok, realized I had a typo on the $value variable, needed to be plural like I used in the foreach loop
$value = get_field('service_options');
Should have been
$values = get_field('service_options');
That took care of the warning, but is still not assigning the checked class to the ones that are checked.
Getting closer!
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.