when checkbox used a "1" displays next to item

3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 28, 2008   (RSS)

Re: [equinox69] when checkbox used a "1" displays next to item

By Dave - March 27, 2008

Hi Terry,

There's a few options for that.

If you want to show some text if a checkbox (named 'feature') is checked, you could use this:

<?php if ($record['feature']): ?>Feature Name<?php endif ?>

Or if you wanted to display two different values such as "Yes" or "No" you could use some code like this:

<?php echo $record['feature'] ? "Yes" : "No"; ?>

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] when checkbox used a "1" displays next to item

By Codee - March 28, 2008 - edited: March 30, 2013

Dave,
Worked PERFECTLY!

Thanks again!