Help Text not appearing when using apex:outputField with a custom label
The solution is easy. Just use the helpText
attribute of the apex:pageBlockSectionItem
and put the help info from the field in it:
<apex:pageBlockSectionItem helpText="{!$ObjectType.Account.fields.Street__c.InlineHelpText}">
<apex:outputLabel value="My Label"/>
<apex:outputField value="{!a.Street__c}"/>
</apex:pageBlockSectionItem>
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_pageBlockSectionItem.htm
This is not a bug and works as designed and discussed in above document .
Note that if you include an
<apex:outputField>
or an<apex:inputField>
component in an<apex:pageBlockSectionItem>
, these components do not display with their label or custom help text as they do when they are children of an<apex:pageBlockSection>
. Also note that<apex:pageBlockSectionItem>
components can't be rerendered; rerender the child components instead.