Skip to Content, PHP, MySQL, Javascript, Ajax, Htacces

How to display the help text on Visualforce Page?

Be First!
by February 2, 2015 SALESFORCE, Visual Force

How to display the help text on Visualforce Page?

when we using the apex:inputField and apex:outputField shows their help Text bubble when nested within a pageBlockSection component automatically like:

<apex:pageBlockSectionItem helptext=”{!$ObjectType.Account.Fields.Phone.InlineHelpText}”>
<apex:outputLabel value=”{!$ObjectType.Account.Fields.Phone.Label}” />
<apex:inputField value=”{!Account.Phone}” />

Syntax to display the Help Text in VF Page:

objectName__c —> SFDC OBJECT API
fieldName__c —> Field API

if we not using the pageBlockSection, then the standard help text bubble is not displayed:

1) If we use “Label” attribute of “apex:outputField” , then helpText bubble is not displayed
2) If we set “showHeader=false”  of <aapex:Page>, in that case also helpText bubbles is not displayed

We can access the help text within an expression by using the respective $ObjectType global variable in visualforce page and here is the example:

<div id=”mainContent”>
Sample helpText bubbles Example
<img src=”/s.gif” alt=”Help” title=”{!$ObjectType.Account.Fields.Phone.InlineHelpText}”/>

By Providing “$ObjectType.Account.Fields.myField__c.inlineHelpText” in <img> tag as TITLE attribute then the helpText will be displayed as ToolTip Text in Image.




Leave a Reply