 |

equinox69
User
Mar 27, 2008, 9:13 AM
Post #1 of 3
(272 views)
Shortcut
|
|
when checkbox used a "1" displays next to item
|
Can't Post
|
|
Dave and Co, On our clients site we have a series of checkboxes used to display a field or not. The checkbox system works great EXCEPT when a box is checked and it displays the field name it also displays a "1". We would only like the field name to display. Example: Let's say the record input person is loading a record for a piece of motorized equipment. We have 2 checkboxes - one for "diesel" and one for "gas". The input person chooses "diesel". When the visitor sees the listing for the record, they see "diesel: 1". Here's a live example of what the visitor see: http://www.graddysequipment.com/customPage.php?1999_FORD_F-800_FLATBED_DUMP-8/ Thanks in advance! Terry
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 27, 2008, 10:35 AM
Post #2 of 3
(268 views)
Shortcut
|
|
Re: [equinox69] when checkbox used a "1" displays next to item
[In reply to]
|
Can't Post
|
|
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
|
|
|  |
 |

equinox69
User
Mar 28, 2008, 2:33 AM
Post #3 of 3
(255 views)
Shortcut
|
|
Re: [Dave] when checkbox used a "1" displays next to item
[In reply to]
|
Can't Post
|
|
Dave, Worked PERFECTLY! Thanks again! Terry
|
|
|  |
|