I am trying to add a custom label to an apex:outputField
tag but when I do the help text disappears. How do I change the label but keep the help text?
The VF snippet below displays the same field three different ways. The first two uses a custom label and the third is the normal apex:outputField
which will use the label from the SObject field. The output is shown below the code.
<apex:pageBlockSection title="Balances" columns="1">
<apex:pageBlockSectionItem >
<apex:outputLabel value="My Label"/>
<apex:outputField value="{!sob.Balance__c}"/>
</apex:pageBlockSectionItem>
<apex:outputField value="{!sob.Balance__c}" label="My Label"/>
<apex:outputField value="{!sob.Balance__c}"/>
</apex:pageBlockSection>
Here is the output. The help text only appears on the third field.