, , ,


By default there is no functionality to display or customize the Tooltip on fields in CRM forms. We can do this by various ways through J-script.

One of the most simplest way is by using “title”. Either the case when we hover the mouse over the “Caption” of the field or the “Data value” of the field, it works perfectly fine.

crmForm.all.name_c.title=”Enter name in UpperCase”;
crmForm.all.name_d.title=”Enter name in UpperCase “;

_c extension specifies the “Caption” of the field.
_d extension specifies the “Data (textbox)” of the field.

The Tooltip here will be in simple textbox with white background and Black text.

Nevertheless in another way of tooltip creation, we can also change its display style.  Its through creating a Popup window using window.createPopup() method and then changing its specific size, location, background colors and even style the element inside the popup.

Note :- The createPopup() method is an IE-only method, and does not work in other browsers !!!

The code goes like this :-

var Popup = window.createPopup();
var PopupBody = Popup.document.body;
PopupBody.style.backgroundColor = ‘yellow’;
PopupBody.style.fontFamily = ‘sans-serif’;
PopupBody.style.border = ‘1px solid black’;
PopupBody.style.padding = “2px”;
PopupBody.innerHTML=”<p style=’font-family:Arial, sans-serif; font-size:11px’>           Enter Name in UpperCase</p>”;

function show() {
var x_coord = 0;
var y_coord = 20;
var width = 135;
var height = 18;
Popup.show(x_coord,y_coord ,width ,height ,event.srcElement);

function hide() {
crmForm.all.shipto_name.attachEvent(‘onmouseover’, show);
crmForm.all.shipto_name.attachEvent(‘onmouseout’, hide);


Ashwani.     🙂