Gossamer Forum
Home : Products : DBMan : Customization :

Re: [Chandler] Compare fields

Quote Reply
Re: [Chandler] Compare fields In reply to
Are you using auto-generate? If not you can do something simple such as (under html_record in html.pl):

|; if ($rec{'email'} ne "") {print qq|<img src="./pic.jpg">|;} print qq|

of course you could get really fancy and do something like:

|; if ($rec{'email'} ne "") {
if ($rec{'email'} =~ /yahoo.com/) {print qq|<img src="./yahoo-logo.gif">|;}
elsif ($rec{'email'} =~ /hotmail.com/) {print qq|<img src="./hotmail-logo.gif">|;}
elsif ($rec{'email'} =~ /aol.com/) {print qq|<img src="./aol-logo.gif">|;}
else {print qq|<img src="./generic-email-logo.gif">|;}
} print qq|

Try it and see what happens. Note that there is no "e" in the else/if statement (elsif).

Good Luck!

Ps: If you're using auto-generate then we'll have to punt.
Subject Author Views Date
Thread Compare fields Chandler 3611 Feb 24, 2004, 5:27 PM
Thread Re: [Chandler] Compare fields
Watts 3501 Feb 25, 2004, 7:40 AM
Thread Re: [Watts] Compare fields
Chandler 3500 Feb 25, 2004, 8:11 AM
Thread Re: [Chandler] Compare fields
Watts 3499 Feb 25, 2004, 10:09 AM
Post Re: [Watts] Compare fields
Chandler 3482 Feb 25, 2004, 2:05 PM