function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MikeGillMikeGill 

Urgent help - inlineHelp not displaying in Visualforce page, could be silly mistake

Hi All,

 

Can anyone spot why this would not be showing the inline / hover over help text?

 

The page is valid

 

Thanks

 

 

<apex:page standardController="Vacancy__c"  extensions="ExternalVacancyControllerExtension" title="Client Vacancy " showHeader="false" standardStylesheets="true">

  <apex:form > 
   <apex:pageMessages />
    <apex:messages />
      <apex:pageBlock title="" mode="edit">
        
        <apex:pageBlockButtons location="bottom" >
           <apex:commandButton value="Confirm" action="{!ConfirmUpdate}"/>
           <apex:commandButton value="Cancel" action="{!Cancel}"/>
        </apex:pageBlockButtons>
        
        <apex:pageBlockSection title="Vacancy Information" collapsible="false" columns="2">
            
            
               <apex:pageBlockSectionItem helpText="{!$ObjectType.Vacancy__c.Fields.Client_Contact_Hiring_Manager__c.inlineHelpText}" >
                    <apex:outputLabel value="Client Hiring Manager" for="Client_Contact_Hiring_Manager__c"/>
                    <apex:inputText value="{!Vacancy__c.Client_Contact_Hiring_Manager__c}" id="hiremgr"/> 
                </apex:pageBlockSectionItem>
            
            

        
                    
        </apex:pageBlockSection>
            
       </apex:pageBlock>
       
       
       
      </apex:form>
</apex:page>

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Pradeep_NavatarPradeep_Navatar

One way you can put help text by overriding the salesfoce css for help text.Tryout the sample code given below :

 

<img src="/s.gif" alt="Help" class="helpIcon" title="Your inline text".

 

 

All Answers

MikeGillMikeGill

Ok, I know how to resolve this, but it creates another problem for me!

 

ShowHeader=True will enable inline help

 

Only problem, I don't want the header to be enabled as I am displaying the visualforce page externally via sites.

 

What's the recommended / best-practice or solution for this one?

 

Thanks

JimRaeJimRae

If you can't have the header displayed, you will need to use a javascript solution for help display.

We have used this set of utilties orginally from Walter Zorn:

http://sourceforge.net/projects/wztip/

 

Good Luck

MikeGillMikeGill

Thanks Jim - I will give it a try!

 

This should be standard - do you know if there is an idea posting for it?

JimRaeJimRae

I am not sure if there is an idea existing, either to allow the help to display even without the header, or some other option.

We like the wztip solution because it allowed a lot more flexibility (size, number of lines, etc) than the standard help did.

Pradeep_NavatarPradeep_Navatar

One way you can put help text by overriding the salesfoce css for help text.Tryout the sample code given below :

 

<img src="/s.gif" alt="Help" class="helpIcon" title="Your inline text".

 

 

This was selected as the best answer
MikeGillMikeGill

Cheers Pradeep - looks interesting

 

Not sure I understand though - How do I use that in the following as I don't see help unless displayHeader=true

 

 

    <apex:pageBlockSectionItem helpText="{!$ObjectType.Vacancy__c.Fields.Client_Contact_Hiring_Manager__c.inlineHelpText}" >
                    <apex:outputLabel value="Client Hiring Manager" for="Client_Contact_Hiring_Manager__c"/>
                    <apex:inputText value="{!Vacancy__c.Client_Contact_Hiring_Manager__c}" id="hiremgr"/> 
                </apex:pageBlockSectionItem>

 

Please can you clarify some more - thanks

 

MikeGillMikeGill

Both solutions work great

 

1. Jim's solution offers the most flexibility for sure

2. Pradeeps solution for simplicity and speed - went with this one

 

and lastly I figured out this works too by reading the documentation

 

<apex:outputLabel value="Company Description" for="compinfo" title="Hello World">

 

 

Just adding a title attribute provides tooltips on mouseover of label.

 

Thanks all

JPlayEHRJPlayEHR

I know this is old, but figured I'd throw in a solution I used to resolve this same issue for the sake of anybody else who finds this thread with a similar problem in the future.  In our case, we have a bunch of apex:outputfields on a grid in an HTML table.  

 

They have to be outputField in order to format the numbers properly, so whenever we throw in apex:pageblock and apex:pageblockSection, it throws off the table since it treats each field as a row of 2 cells.  Here's my workaround solution:

 

<table><tr><td>
     <span class="helpButton" id="[uniqueIDofYourChoice]-_help">
          [Your Displayed Text]
          <img src="/s.gif" class="helpOrb"/>
          <script type="text/javascript">
               sfdcPage.setHelp('[uniqueIDofYourChoice]','[Your Help Text]');
          </script>
     </span>
</td></tr></table>

 You could also use "{!$ObjectType.[YourObject].Fields.[YourFieldWithHelptext].inlineHelpText}" instead of hardcoded text.

MikeGillMikeGill

Never too late - one for the toolbox!

 

Cool

turbo2ohturbo2oh

The last soltuion provided doesn't work with the header off. It sounds like there's a few options:

 

1. Use the last solution if the header is on

 

2. You can use a simple title attribute for basic tooltips lacking style

 

3. You can recreate full functionality using a javascript library

 

Is there no way to just identify the js/css files missing with the header set to false and drop those back in and use the default functionality? 

Vijay VaradaVijay Varada

Here is workaround when you have showheader set to false in your page:

 

Css to include:

-----------------

 <style>
        .vfHelpText a            {position:relative;}
        .vfHelpText a span       {display: none;}
        .vfHelpText a:hover span {display: block;
                                  position:absolute;
                                  top:1.25em;
                                  padding:2px 5px;
                                  left:-15em; width:15em;
                                  z-index:100;
                                  border:1px solid orange;
                                  background-color:#FEFDB9;
                                  color:black;
                                 }
 </style>

 

VF Code:

-----------

<apex:pageBlockSectionItem>
      <apex:outputLabel value="{!$ObjectType.Account.Fields.Name.Label}">
             <span class="vfHelpText">
                    <apex:outputLink value="javascript&colon;return false;">
                           <img src="/s.gif" alt="" class="helpOrb" />
                           <span>{!$ObjectType.Account.Fields.Name.inlineHelpText}</span>
                    </apex:outputLink>
             </span>
      </apex:outputLabel>
      <apex:inputText value="{!acc.Name}"/>
</apex:pageBlockSectionItem>

 

 

Dennis WilsonDennis Wilson
Vijay's solution worked for me, with one little tweak to completely "kill" the outputLink from having any action when clicked:
 
<apex:outputLink onclick="return false;">