Gossamer Forum
Home : Products : DBMan : Customization :

Icons to replace Checkboxes

Quote Reply
Icons to replace Checkboxes
Hi everyone.
Can anyone give me insight on how to go about replacing checkboxes with icons?

When a user searches / quick view or whatever they do to get to the records, I want the user to view small icons instead of text generated from checkbox fields in the database. Am I making sense?

Let me add a bit more info:
I am using the short/long mod.
When someone does a search, I want icons to show up (IE: amenities) instead of the text

Here is a link to give you an idea.

http://www.rrvacations.com/search/advancedsearch.cfm
At the bottom just choose advanced search and you'll see what I mean.

Actually finally got it to work.....however when I add an else statement, it still craps out on me.

print qq||;
if ($rec{'JACUZZI_TUB'}) {
print qq|
<td valign="top" width="50"><img src="$db_image_url/hottub.gif"></td>
|;
else {
print qq|
<td valign="top" width="50"><img src="$db_image_url/hottub.gif"></td>
|;
}
Quote Reply
Re: Icons to replace Checkboxes In reply to
I would suggest visiting the FAQ noted below and looking under the section for "Images".

I think you may find some ideas either in that section or under perhaps "Viewing / Format". I know this has been done and is referenced somewhere in the FAQ.

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Icons to replace Checkboxes In reply to
print qq||;
if ($rec{'JACUZZI_TUB'}) {
print qq|
<td valign="top" width="50"><img src="$db_image_url/hottub.gif"></td>
|;
else {
print qq|
<td valign="top" width="50"><img src="$db_image_url/hottub.gif"></td>
|;
}


It works until I add the else statement.
Any ideas??

Quote Reply
Re: Icons to replace Checkboxes In reply to
You are not using the correct syntax...you forgot to add a right bracket after the IF statement.

The codes should be:

Code:

print qq||;
if ($rec{'JACUZZI_TUB'}) {
print qq|
<td valign="top" width="50"><img src="$db_image_url/hottub.gif"></td>
|;
}
else {
print qq|
<td valign="top" width="50"><img src="$db_image_url/hottub.gif"></td>
|;
}


See the difference?

Regards,

Eliot Lee