0

I have a component in which i am using outputfield to display fields. The help text is not displayed. In the same component i have inputfield and the help text is displayed fine. what could be the issue.

<apex:pageBlock id="CDA_Pageblock_edit" mode="maindetail" rendered="{!agreementMode == 'edit'}">
    <apex:pageBlockSection id="CDA_Pb_Section" columns="2">
        <apex:inputfield id="cda_request_confidential" value="{!agreementRecord.Disclosure_Type__c}"/>
        <apex:inputfield id="cda_request_confidential_comments" value="{!agreementRecord.Disclosure_Purpose__c}"/>
        <apex:inputfield id="cda_request_confidential_description" value="{!agreementRecord.Confidential_Info_Description__c}"/>
    </apex:pageBlockSection>
</apex:pageBlock>

<apex:pageBlock id="CDA_Pageblock" mode="maindetail" rendered="{!agreementMode == 'view'}">
    <apex:pageBlockSection id="CDA_Pb_Section" columns="2">
        <apex:outputField id="cda_request_confidential" value="{!agreementRecord.Disclosure_Type__c}" title="{!$ObjectType.Apttus__APTS_Agreement__c.Fields.Disclosure_Type__c.InlineHelpText}"/>
        <apex:outputField id="cda_request_confidential_comments" value="{!agreementRecord.Disclosure_Purpose__c}"/>
        <apex:outputField id="cda_request_confidential_description" value="{!agreementRecord.Confidential_Info_Description__c}"/>
    </apex:pageBlockSection>
</apex:pageBlock>

1

You need to use the <apex:pageBlockSectionItem> text if you want to specify help text.

<apex:pageBlock ...>
    <apex:pageBlockSection ...>
        <apex:pageBlockSectionItem helpText="{!$ObjectType.MyObject__c.fields.MyField__c.inlineHelpText}">
            <apex:outputLabel value="{!$ObjectType.MyObject__c.fields.MyField__c.label}" />
            <apex:inputField value="..." />
        </apex:pageBlockSectionItem>
    </apex:pageBlockSection>
</apex:pageBlock>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.