Gossamer Forum
Home : Products : DBMan : Customization :

Help needed modding a field

Quote Reply
Help needed modding a field
I have a price field with the options 'For-sale' 'Not for sale' 'Entertain offers' and 'Sold'. I want to display icons with the displayed record (not for adding an record) that relate to the choices made so a sold or whatever icon is shown on the record without the other choices. Any help would be appreciated.
Quote Reply
Re: Help needed modding a field In reply to
Scouser:

You can define your graphics in your .html or format.pl file for example:

$item_soldgif = '<IMG SRC="../images/itemsold.gif" ALT="[ Item Sold ]" WIDTH=16 HEIGHT=16 BORDER=0 ALIGN=absmiddle>';


In your html_record or html_record_long within the field that you want display the graphic use:

|;
if ($rec{'price'} eq "For-Sale") { print qq| $item_salegif |; }
if ($rec{'price'} eq "Not for Sale") { print qq| $item_nosalegif |; }

etc.

And if you are using the short/long mod you can also include the graphic there by using the same coding, providing the graphics are small Smile

Hope this helps Smile
Quote Reply
Re: Help needed modding a field In reply to
Thanks Lois, it works fine.