Tuesday, March 21, 2017

Displaying HelpText on VF page

Displaying HelpText on VF page


Hi,
We can easily show a custom fields help text on our page on our desired image like this:-

For example there is a custom field in Account object named Active__c. And you wanna show its help text on VF page, do this:-

<img src="/resource/1247568559000/del_img" alt="" title="{!$ObjectType.Account.Fields.Active__c.inlineHelpText}"/>

If you need pure css based tooptip with your own style and without any javascript, here it is:-

<style>
a:hover {
background:#ffffff;
text-decoration:none;
} /*BG color is a must for IE6*/


a.tooltip span {
display:none;
padding:2px 3px;
margin-left:8px;
width:130px;
}


a.tooltip:hover span{
display:inline;
position:absolute;
background:#ffffff;
border:1px solid #cccccc;
color:#6c6c6c;
}
</style>


<a class="tooltip" href="#">
<img src="/resource/1247568559000/del_img"/>
<span>{!$ObjectType.Account.Fields.Active__c.inlineHelpText}.</span>
</a>


Enjoy!

Available link for download

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.