Ajax DataGrid Support Product Page

adding mailto: link to field

Asked 17 Dec 2010 16:28:53
1
has this question
17 Dec 2010 16:28:53 Sally Carr posted:
I'm trying to figure out how to add a mailto: link to the email field of my adg. I've tried various renditions of:

display: "Email",
name: "<a href="<%=(rs_residents.Fields.Item("txtemail".Value)%>"txtemail"",
width: 150,
sortable: true,
align: "left",
hide: false

but nothing works. I see nothing in the datagrid page that looks relevant either. Can you tell me if this is possible?

thank you.

Promoted Answers

Replied 22 Dec 2010 11:02:59
Hello Sally,

You need to use "before" and "after" fields for the mail column in Content tab. Do following:
1. Open ADG UI and go to Content tab.
2. Select the column that will contain the e-mails.
3. In "before" field type:
<a href="mailto:

4. In "after" field type:
">{name_of_the_column}</a>


where {name_of_the_column} is the actual name of the coulmn that contains the e-mails.
This will produce following output:
<a href="mailto:maime@mail.com">maime@mail.com</a>

If you want to change the text that will appear as a link change the {name_of_the_column} with whatever text you like:
maybe something like 'CONTACT' or 'Send Mail' or whatever.

Regards,

Replies

Replied 22 Dec 2010 11:02:59
22 Dec 2010 11:02:59 Miroslav Zografski replied:
Hello Sally,

You need to use "before" and "after" fields for the mail column in Content tab. Do following:
1. Open ADG UI and go to Content tab.
2. Select the column that will contain the e-mails.
3. In "before" field type:
<a href="mailto:

4. In "after" field type:
">{name_of_the_column}</a>


where {name_of_the_column} is the actual name of the coulmn that contains the e-mails.
This will produce following output:
<a href="mailto:maime@mail.com">maime@mail.com</a>

If you want to change the text that will appear as a link change the {name_of_the_column} with whatever text you like:
maybe something like 'CONTACT' or 'Send Mail' or whatever.

Regards,
Replied 13 Oct 2012 14:43:06
13 Oct 2012 14:43:06 Keith Bishop replied:
I have a similar problem only I want to make a Surname column into a mailto: hyperlink to the Email column(a hidden column)is this possible? i.e. If the record has an email the Surname is displayed as a mailto: hyperlink
Replied 18 Oct 2012 06:58:00
18 Oct 2012 06:58:00 Miroslav Zografski replied:
Hello Keith,
The solution is similar
for before field of the surname column set this:
<a href="mailto:{nameOfTheColumnContainingEmail}">

and for value in after field set:
</a> 


Replied 19 Oct 2012 09:05:36
19 Oct 2012 09:05:36 Mike Kemp replied:
a href="mailto{EMAIL}">
</a>
does not work

"<a href="mailto{EMAIL}"><a/>"
does not work

<a href="mailto{EMAIL}">{NAME}
<a/>
does not work

<a href="mailto{EMAIL}"
{EMAIL}<a/>
does not work

<a href="mailto{EMAIL}"
{NAME}<a/>
does not work

HOWEVER:
<br /><a href="mailto[EMAIL}">{EMAIL}<a/> works by putting the email underneath the NAME field

Reply to this topic