Re: [InfamousNugz] Hide Checkbox
Hi InfamousNugz,
Sorry about that! You are right of course. I should have tested that.
That's actually a bug. I've submitted a patch and hope to have it fixed in the next release.
In the meantime, you can use the following workaround which will keep working properly if you upgrade to a version in which the bug is fixed:
Checkbox: <?php
// output checkbox field
$value = $newsRecord['checkbox'];
if ( $value == '1' ):
echo "Yes";
elseif ( $value == '0' ):
echo "No";
else: // bug has been fixed!
echo $value;
endif;
?><br/>
(Note that you'll need to change the name of the record variable and the field to match what you've got set up, as well as the strings "True" and "False" to your Checked Value and Unchecked Value; everything you'll want to change is highlighted in red above.)
Of course, after the bug is fixed, you can replace that with your original, much simpler, code.
Again, sorry about that! Please let us know if you have any more questions or comments.
All the best,
Chris