Tuesday 21 August 2012

Help text in VF Page Apex components

How to add a help text icon its related help text for a apex component on VF page ????
apex:inputField and apex:outputField should show their help bubble (if applicable) when nested within a pageBlockSection component automatically.

This may be helpful:

If you want to provide your own text instead you can by utilizing the helpText attribute on pageBlockSectionItem. Also you can access the help text within an expression by using the respective $ObjectType global as such:

$ObjectType.Account.Fields.myField__c.inlineHelpText

Hopefully this will give you what you need for most any purpose but by all means leverage the idea exchange to help us understand what may still be missing!

<apex:pageBlockSectionItem helpText="{!$ObjectType.Contact.Fields.New_Agency_Name__c.inlineHelpText}" >

In this example I was referencing the custom field "New_Agency_Name__c" on the standard object Contact.

No comments:

Post a Comment