29.10.2009 Update: I have written a new article on how to add HTML-style tool tip – read it here.
I got a request for a method of adding a custom mouse-over tool tip on a field in a SharePoint form. Here is a quick example.
As always we start like this:
Create a document library to hold your scripts (or a folder on the root created in SharePoint Designer). In this example i have made a document library with a relative URL of “/test/English/Javascript” (a sub site named “test” with a sub site named “English” with a document library named “Javascript”):

The jQuery-library is found here. The pictures and the sourcecode refers to jquery-1.3.2.min. If you download another version, be sure to update the script reference in the sourcecode.
Add a CEWP below your list-form like this:
And add this code:
<script type="text/javascript" src="/test/English/Javascript/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
fields = init_fields();
$(fields['Title']).find('input').attr('title','This is a new mouse-over tooltip');
function init_fields(){
var res = {};
$("td.ms-formbody").each(function(){
if($(this).html().indexOf('FieldInternalName="')<0) return;
var start = $(this).html().indexOf('FieldInternalName="')+19;
var stopp = $(this).html().indexOf('FieldType="')-7;
var nm = $(this).html().substring(start,stopp);
res[nm] = this.parentNode;
});
return res;
}
</script>
The tooltip should look like this:

Ask if this example is not enough.
Alexander
October 22, 2009 at 3:35 pm |
Great, this is very clean and simple. Using the title tag for the field. How can we convert this to build a true tool tip that is customizable, and we get it on mouse over of the label also?
October 22, 2009 at 3:42 pm |
Hi,
Where would you like to customize the tooltip? – in a separate list?
If so – you will find an example of howto do this in this post:
Get variables in a script from another list
To have the tooltip on the entire row, edit the code like this:
$(fields['Title']).attr('title','This is a new mouse-over tooltip');Alexander
October 22, 2009 at 3:57 pm |
Yes I remember that post. another solid hit. I have been trying to build a tool tip that you could customize the terxt, by adding color for formating the text. Something you could set a position of the text, but not get in the way of typing in the field. Also maybe make it not on mouseove. but adding a small image that can be clicked for details and have the popup with the text. The best case would be to have the ability to pull the tooltip text from another list. but for now I am just trying to create a customizable tooltip with color format and position.
October 29, 2009 at 8:48 pm |
Once again your prayers are answered
Add HTML mouseover tooltip
Alexander
October 29, 2009 at 8:59 pm |
I am not worthy to be in your presence
November 12, 2009 at 4:53 pm |
Hi Alexander,
how can i display the tooltip for sahrepoint calendar. i.e i need to dispaly the mouse over message for sharepoint calendar event item.
any way to do that?
Thanks
Amit
November 12, 2009 at 5:36 pm |
Hi Amit,
What kind of information do you want to display in the tooltip? – is it information from the list item itself or some kind of generic information?
Alexander
November 12, 2009 at 5:45 pm |
Hi Alexander,
i have a column called Course description. I want to display that information. So the information is from list only.
Amit
November 14, 2009 at 10:08 am
Hi Amit,
I have done some testing and your request corresponds with another request made in the requests post. I’m going to publish an article on this – possibly during the weekend.
Alexander
November 17, 2009 at 11:50 pm
Hi Amit,
Look here for the solution:
Preview metadata in list view on mouseover
Alexander
November 18, 2009 at 5:53 pm |
Hello Alex.
You have great work and I am looking forward to utilizing your code. My request is similar to Amit’s in that I have a table with a title and message column. On the “dashboard” page, I am only displaying the title column and would like to have a tooltip which would display the content of the message column which corresponds to that item. Please let me know if you have a solution for this.
Thanks again!
Alex
November 18, 2009 at 7:57 pm
Hi,
To use this solution Preview metadata in list view on mouseover, you have to show the field “Title (linked to item)” or “Title (linked to item with edit menu)”.
This has to do with the preview reading the URL from this field. If you use the “plain” Title-field, you do not get this link and therefore no preview.
Alexander