Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
when checkbox used a "1" displays next to item

 

 


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:


Code
<?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:


Code
<?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

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4