+ Start a Discussion

showHeader="false" inputField help text lost

In an Apex page does anyone know how to show the field help text (the standard question mark next to the field) when using <apex:inputField if the showHeader="false"? I noticed that in my apex code, fields show their help text when showHeaders="true" but disappears as soon as I set showHeaders to "false". Is there an attribute that needs to be set somewhere?
Rajesh ShahRajesh Shah

I am aware that Titles that do not show up when ShowHeaders is false, but help text not showing up is weird.

Anyways you could try using helpText attribute of page block section item to show the helptext. Below is an example


<apex:pageBlockSectionItem helpText="My Help Text">
<apex:outputLabel value="Account Number" id="AccNoLabel" for="AcctNo" />
<apex:inputField id="AcctNo" value="{!cs.Acct_Num__c}" required="true"/>




Message Edited by Rajesh Shah on 01-07-2010 03:08 PM

help text only displays if the showHeader attribute of the parent page is set to true


Thanks Rajesh,


There are a number of concerns with the approach you suggest:



  1. I like to use the <apex:detail relatedList="false"  title="false"/> to defer to the standard Page Layout of an object as much as possible and this approach would force me to code every page using the <apex:outputField ...> . Not a big deal if it is one SObject but when you have many and all the associated fields it is a big overhead to carry just because showHeaders = 'false'.
  2. Also, it means duplication of help text and managing it in 2 places which adds to the maintenance overhead and I always hate duplication.
  3. If Salesforce bring out a new enhanced feature in their Help you cannot automatically take advantage of the feature.
  4. For entry mode VF pages the standard way is to use <apex:inputField value='{!someField}"> but I now have to change that to explicitly define the field label and the field. What was a simple one line statement has become 4 lines and again multiply that by a large number of fields that seems a high price for showHeaders to be set to 'false'.


I set up a test object to try out your suggestion (see below) but it wouldn't work for me and no help is displayed. 



<apex:page standardController="TestHelpAccount__c" 
  <apex:form >
    <apex:pageBlock title="Account" id="thePageBlock">
      <apex:pageBlockButtons location="both">
       <apex:commandButton value="Edit" action="{!edit}"/> 
       <apex:commandButton value="Delete" action="{!delete}"/>      
      <apex:pageBlockSection title="Account Information" collapsible="false">
        <apex:outputField value="{!TestHelpAccount__c.Name}"/>
        <apex:pageBlockSectionItem />
        <apex:pageBlockSectionItem helpText="Display help text for this field">
          <apex:outputLabel value="Widget Description" id="AccNoLabel" for="AcctNo"/>
          <apex:outputField value="{!TestHelpAccount__c.Widget_Description__c}" id="AcctNo"/>


Thanks anyway.







You can find my replay content in Visualforce developer's guide,this mean helpText  content will not  display if showheared="false" .But you can try bind html tag title value like this:value="{!$ObjectType.Contact.Fields.New_Agency_Name__c.inlineHelpText}"


You suggest using the $ObjectType for inline help text. How would you apply your suggestion to the example code shown earlier?


There may to be a "solution" to this issue by building a Field map in Apex code but if I had to apply that to every field it would quickly become an unmanageable mess. What I would like to see is for SF to prescribe a Boolean value on each field to indicate he field help is displayed with a default of true but before I put that up as an Idea I want to explore what the available options are to resolve this problem.


I solved this by setting showHeader="true", but modifying the css


<style type="text/css">
.bPageHeader {



Awesome workaround!