You need to sign in to do that
Don't have an account?

Displaying helptext for a field in pageblock table
Hi ,
We have a visual force page for adding the products for an opportunity where
<apex:page standardController="OpportunityLineItem" extensions="ProductExtensionController" id="pg" tabStyle="Opportunity" showHeader="true"> <style type="text/css"> .longText { width:100px; } </style> <apex:form id="frm"> <!--Displays Error messages.---> <apex:pagemessages /> <apex:pageBlock id="pgBlock0"> <!--Display page to add products to oppurtunity from Cloud User Pricebook.---> <apex:pageBlockSection id="pgBlock1"> <apex:pageBlockTable value="{!CloudProducts}" var="pro1"> <apex:column > <apex:facet name="header">Product Name</apex:facet> <apex:outputText styleClass="longText" value="{!pro1.prodWrapper .Name}"> </apex:outputText> </apex:column> <apex:column > <apex:facet name="header">Quantity/Term</apex:facet> <apex:inputField value="{!pro1.oli.Quantity}" required="true"/> </apex:column> <apex:column > <apex:facet name="header">No.of Users</apex:facet> <apex:inputField value="{!pro1.oli.No_of_Users__c}" required="true"/> </apex:column> <apex:column > <apex:facet name="header">Price per user/month</apex:facet> <apex:inputField value="{!pro1.oli.Price_per_user_month__c}" required="true"/> </apex:column> <apex:column > <apex:facet name="header">Revenue Type</apex:facet> <apex:inputField value="{!pro1.oli.Revenue_Type__c}" required="true"/> </apex:column> <apex:column > <apex:facet name="header">Product Type</apex:facet> <apex:inputField value="{!pro1.oli.Product_Type__c}" required="true" /> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> <!--Display navigation buttons---> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Save&More" action="{!saveMore}"/> <apex:commandButton value="Cancel" action="{!Cancel}"/> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>
we want to display the helptext for the field "Product_Type__c" in the page, can someone help me how can we do this. I see some solutions saying to display as below:
<apex:pageBlockSectionItem helpText="{!$ObjectType.OpportunityLineItem.Fields.Product_Type__c.inlineHelpText}"/>
but not able to use this anywhere wherever i use i get the blank message whith no content.
Regards,
Krishna.
"Note that if custom help is defined for the field in Setup, the field must be a child of an <apex:pageBlock> or<apex:pageBlockSectionItem>, and the Salesforce page header must be displayed for the custom help to appear on your Visualforce page."
If you dont want to use apex:pageblock then please try something like below:
<apex:outputlabel value=" your field label" /><img src="/resource/1350954764000/question" title="Help text here" height="13" width="13"/>
<apex:inputField value="{!your field}"/>
All Answers
Hi Krishna,
The help text appears automatically with the use of apex:inputField tag.
But for that you must have to enter value in Help Text in the Custom Field Definition and header of visualforce page must be enabled.
Go to OpportunityLineItem object and enter value in Help Text in Product_Type__c field. And then check your page once again.
All the configurations are made correct but still no luck
"Note that if custom help is defined for the field in Setup, the field must be a child of an <apex:pageBlock> or<apex:pageBlockSectionItem>, and the Salesforce page header must be displayed for the custom help to appear on your Visualforce page."
If you dont want to use apex:pageblock then please try something like below:
<apex:outputlabel value=" your field label" /><img src="/resource/1350954764000/question" title="Help text here" height="13" width="13"/>
<apex:inputField value="{!your field}"/>
Hi Coco,
if you see my code page header is set to "True" but still i am not able use it
hi coco thanks for the solution it is working paritally but i am getting the blank image of the helptext icon?
Hi Coco,
your solution helped me to figure out to use the option.