Brilliant! Works like a charm. Thank you!
Hi there
Thanks for an awesome plugin. I cant get enough 🙂
I am trying to do something similar to @maxpeerawat… @hube2’s solution works for me but only if I set the field to return a VALUE only. I am using BOTH.
I have tried a few things but have been struggling for hours now. Can you please shed some light or point me in the right direction… I have this so far:
<?php
$values = get_field('features');
$field = get_field_object('features');
$choices = $field['choices'];
foreach ($choices as $value => $label) {
echo $label,': ';
if (in_array($value, $values['value'])) {
echo 'checked';
}
}
?>
Regards
Daryl