Home › Forums › General Issues › If a checkbox value is checked › Reply To: If a checkbox value is checked
Isn’t it so that when jut one checkbox has been checked the return is not an array but rather just a string.. So if you know that your user will always just check one (if so Id use radiobuttons instead) you should just check it like a regular string..
<?php if ('in_stock' == get_field('stock')) { ?>
STUFF HERE
<?php } ?>
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.