Gossamer Forum
Home : Products : DBMan : Discussions :

Icons representing Checkbox items

Quote Reply
Icons representing Checkbox items
Hi,

I have a field called Facilities which basically is a checkbox field that contains values for example: "pool~~bar~~gym"



What I want to do is display each of these as icons in my HTML. I have tried

if ($rec{'Facilities'} eq "Restaurant")

but alas, to no avail. Is there a way to do this, or some quick and dirty way ... either way, I dont mind :)
Quote Reply
Re: [Palemo] Icons representing Checkbox items In reply to
Checkboxes are, by nature, not multiple select items. They are an "on/off" switch. Either it is or it isn't. You'll need to make a field for each of your checkbox fields.

if ($rec{'pool'} eq "Yes") { print qq|$poolgif|; }

Then define $poolgif in your .cfg file or format.pl if you are using the userfriendly mod.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Icons representing Checkbox items In reply to
>>if ($rec{'pool'} eq "Yes") { print qq|$poolgif|; } <<

Or simply:

$rec{'pool'} eq "Yes" and print $poolgif;
Quote Reply
Re: Icons representing Checkbox items In reply to
The only thing is that is isnt effective for me to create a field for each checkbox item. I have over 1500 records, and it is nearly impossible to split them into seperate fields.



There isnt another way?