email field in list view
I have a mystery needs to solve. I need your help.
We have an employee directory on our Moss 2007 site.
I know this is a list created in sharepoint. And for the view there are a list of columns created, for example name, position, phone, email.
For the email column I can see it is an email link, by clicking it, I can see it opens outlook new email. I would like to know how that field created as an email link.I can see the emailaddress column is created as column type=a single line of text.
If I look at the page in browser-viewsoucecode, I can see there is a mailto: in front of the email address.
But how this is created when creating the list and fields?
Answers
- Try this:
<a>
<xsl:attribute name="href">mailto:<xsl:value-of select="@EmailAddress" /></xsl:attribute>
<xsl:value-of select="@EmailAddress" />
</a>- Marked As Answer byAnna2009 Monday, November 09, 2009 2:07 PM
All Replies
- Sharepoint automatically converts them for you. If you have a web site address in that field, it'll turn it into a hyperlink for you.
They are not URLs, they are email addresses.
I would like to figure how this was done when setup the sharepoint list.
Now the employee list has name, position, and email. the email is a link.
But when you click the employee name, it goes to a detail page at there the email address is a plain text not a link.
I want to change this email to a link too just like the one in the list.
Thanks- I found in the individual employee detail page, the code is like below.
<td class="ms-vb" style="width: 28%">
<b>Email Address:</b>
</td>
<td width="75%" class="ms-vb">
<xsl:value-of select="@EmailAddress" />
How can I change the email address to display as the email link?
I can see the email address is a data field defined below.
<datafields>@Title,Full Name;@First_x0020_Name,First Name;@Last_x0020_Name,Last Name;@Middle_x0020_Name,Middle Name;@Assignment,Assignment;@Building_x0020_Code,Building Code;@Building,Building;@Staff_x0020_ID,Staff ID;@EmailAddressHidden,EmailAddressHidden;@FirstLetterLastName,FirstLetterLastName;@Phone_x0020_Number,Phone Number;@IsAdminContact,IsAdminContact;@AdminGroup,AdminGroup;@Email_x0020_Address,Email Address;@Category,Category;@Delete_x0020_flag,Delete flag;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;</datafields> - Try this:
<a>
<xsl:attribute name="href">mailto:<xsl:value-of select="@EmailAddress" /></xsl:attribute>
<xsl:value-of select="@EmailAddress" />
</a>- Marked As Answer byAnna2009 Monday, November 09, 2009 2:07 PM
- Thanks, that works!


