Gossamer Forum
Home : Products : DBMan : Customization :

How do I setup an clickable Email Field

Quote Reply
How do I setup an clickable Email Field
I need to have a field called 'Email' which the user can fill in in the ADD Form. This should be clickable from the search results output page. Can anyone help me with how this is to be done.

Also I added two fields in the database definations in default.cfg and made the necessary canges in the html.pl too .... I gave it 0 field-length which denotes it as a selectbox... problem is it opens as an text field in all the pages..... it dosnt show the select parameters.
.....Anyone know what is to be done..

Would appreciate all help.
Thanx.
Quote Reply
Re: How do I setup an clickable Email Field In reply to
1st
Email link,
post it as.....
Code:
<a href="mailto:$rec{'Email'}">$rec{'Email'}</a>
this will make the email address the link and if no address, this will not show.

Dave T
Quote Reply
Re: How do I setup an clickable Email Field In reply to
dave... Thanks for your reply..... but I did that and it still dont work.... see i need to add the email in a field called Email and then when that prints out on the results page i need that it be clickable.....

Quote Reply
Re: How do I setup an clickable Email Field In reply to
what are you entering into email field?
dave@whatever.com ? or ?
be sure the field name is Email not email
the link needs to be inside of print qq| statement on you view page in html.pl
you say it doesn't
what happens ??? show some code.

[This message has been edited by Dave T (edited December 09, 1999).]
Quote Reply
Re: How do I setup an clickable Email Field In reply to
Dave.... I am entering the Email like name@domain.com and yes.. the field is Email not email..... besides... i tried that again.... it shows invalid format..???

Can you help me out again?
thanks
Quote Reply
Re: How do I setup an clickable Email Field In reply to
the code I posted works for me on my pages
try to print just the contents of the Email field like

$rec{'Email'}
inside print qq| statement
does this print anything

is your input in sub html_record_form like..
Code:
<INPUT TYPE="TEXT" NAME="Email" VALUE="$rec{'Email'}" SIZE="40" MAXLENGTH="255">

is Email a new field in your database?

[This message has been edited by Dave T (edited December 09, 1999).]
Quote Reply
Re: How do I setup an clickable Email Field In reply to
Yes... its a seperate field... Email
Iknow... I think so at least what is required... i just dont know how to go about it ???
I think that we need to add an HREF mailto: somewhere in htmpl.pl...... prior to parsing out that field to print....

What do you think ? Suggest??? advise???
Quote Reply
Re: How do I setup an clickable Email Field In reply to
You need to add the codes that Dave T initially provided in the sub html_record routine and/or sub html_record_long in your html.pl file.

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: How do I setup an clickable Email Field In reply to
 
Thanks Eliot maybe that will help.


[This message has been edited by Dave T (edited December 09, 1999).]
Quote Reply
Re: How do I setup an clickable Email Field In reply to
Thanks a ton... dave T and Eliot..... I had a silly mistake that i overlooked... yes... Dave was right.....
Its working fine now...

I need assiatnce on another one... am posting that seperately .... please send me your suggestions.!

Thanks in Advance.

Quote Reply
Re: How do I setup an clickable Email Field In reply to
I am using templates in DBMan,
How do I make the <%email%> that is in a tempalte an active link?
Thank you
Quote Reply
Re: How do I setup an clickable Email Field In reply to
Bert,

I cannot believe you cannot see the connections between the codes I've provided you in the past...

Anyway...

In your sub html_record routine in the template.pl file, add the following variable:

Code:
$email .= qq|<a href="mailto:$rec{'Email'}">$rec{'Email'}</a>|;

Then define the tag as follows:

Code:
email => $email,

Then in the html_record.html file, add the following tag:

Code:
<%email%>

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: How do I setup an clickable Email Field In reply to
Thanks I am just starting to understand the relationships between the templates and the code in dbm_templates_html.pl,
I think I followed your instructions here, but I am not geting the <%email%> to light up? I have the field defined in defalut.cfg as
Code:
'email' => [9, 'alpha', 20, 65, 0,'','.+@.+..+'],

Does the E need the capitialzation?
just to be sure
Code:
sub html_record { #done
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.
#Modified by bert forum 1671.html
$email .= qq|<a href="mailto:$rec{'Email'}">$rec{'Email'}</a>|;
my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';



$html_record_data = &load_template ('html_record.html', {
permissions => $permissions,
html_header => $html_header,
html_footer => $html_footer,
font_title => $font_title,
html_title => $html_title,
db_script_url => $db_script_url,
db_setup => $db_setup,
db_uid => $db_uid,
db_userid => $db_userid,
in_userid => $in{'userid'},
in_pw => $in{'pw'},
email => $email,

%rec,
%globals
});

return ($html_record_data);

}

Sorry for any inconvience.
Thanks agian.
Quote Reply
Re: How do I setup an clickable Email Field In reply to
Eliot, could you send me private mail, please?

deni@jpdeni.com

Thanks.


------------------
JPD