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
s5s5 

Displaying help text in visualforce page

Hi Team, I want to display the help text in visualforce page but i tried the below code but i am getting so error message.
{!$ObjectType.Request__c.fields.Name__c.InlineHelpText}
Please let me know why I am getting so many error message and please let me know the solution to display help text in visualforce page. Thanks in advance.
bob_buzzardbob_buzzard

According to the docs, you have to have an inputfield that is a child of pageblock or pageblocksectionitem and the showheader attribute of the page must be set to true - does that reflect your markup?

s5s5


<apex:pageblockSectionItem >
                <apex:outputLabel value="{!$ObjectType.Request__c.fields.Name__c.label}" for="name">
                    <span style="font-size:x-small"><br>
                    {!$ObjectType.Request__c.fields.Name__c.InlineHelpText}
                </apex:outputLabel>
                <apex:inputField id="email" value="{!Request__c.Name__c}" onfocus="true" required="true"/>
            </apex:pageblockSectionItem></br>

 

 

This is the code I wrote to display help text. Please let me know how to display help text in VF page.

 

Ankit AroraAnkit Arora

Just to confirm are you getting this error while compiling the code or while hitting the page. Also if possible please provide the full error so we can understand better.

 

Meanwhile you can try this :

 

<apex:pageBlockSectionItem HelpText="{!$ObjectType.account.fields.Name.inlineHelpText}">
{!$ObjectType.Account.fields.Name.label}
<apex:inputText value="{!Account.Name}" />
</apex:pageBlockSectionItem>

 But as you said this is not working for you then you can refer this post :

 

http://boards.developerforce.com/t5/General-Development/Displaying-Standard-help-Text-on-Force-com-Site/td-p/312409

 

Shashikant provided some good tips, I prefer to provide you the link instead of writing the same thing again.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

s5s5

I am getting error message when compiling itself.

bob_buzzardbob_buzzard

Can you paste the error message here?

s5s5

<apex:pageBlockSectionItem HelpText="{!$ObjectType.Request__c.fields.Name__c.inline​HelpText}">
{!$ObjectType.Request__c.fields.Name__c.label}
<apex:inputText value="{!Request__c.Name__c}"/>
</apex:pageBlockSectionItem>

 

I tried this code but now i am getting syntax error.

bob_buzzardbob_buzzard

It would be really helpful if you could post the actual text of the error, otherwise we have to use your code in our dev orgs to see what happens.

Ankit AroraAnkit Arora

Yes, please paste the error which is displayed when you complie the code.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

s5s5

Hi ,

 

Just it is showing

ErrorError: Syntax error

" if i tried the above code.Otherthan this it is not showing any error message for the  above code.

 

 

Ankit AroraAnkit Arora

Probably there might be two reasons for this :

 

1) When we copy paste your code there are some characters included in the text which visualforce doesn't support those are also not visible here. Will be displayed when you copy it to notepade. So try copy code from here :

 

<apex:pageBlockSectionItem HelpText="{!$ObjectType.Request__c.fields.Name__c.inlineHelpText}">
{!$ObjectType.Request__c.fields.Name__c.label}
<apex:inputText value="{!Request__c.Name__c}"/>
</apex:pageBlockSectionItem>

 2) You are using Name__c, are you sure this is your custom field. If not then you can try this code :

 

<apex:pageBlockSectionItem HelpText="{!$ObjectType.Request__c.fields.Name.inlineHelpText}">
{!$ObjectType.Request__c.fields.Name.label}
<apex:inputText value="{!Request__c.Name}"/>
</apex:pageBlockSectionItem>

 

Am pretty sure my first assumption will be the cause.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

s5s5

ya you are correct.Now it is not showing any error but at the same time it is not displaying any help text.why it is not displaying any help text if i put the cursor near to that field.

 

Please help me in this.

Ankit AroraAnkit Arora

Help text icon is not displaying or the text inside the help text icon is not displaying?

 

If the icon is not displaying then you should check -> Field is having a help text on object level or not.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

s5s5

Help text and icon both are not displaying.Help text is displaying in standared page but not in visualforce page .

 

Please help me in this.

 

Ankit AroraAnkit Arora

Please paste your complete visualforce code and let me know you are using this page on portal/sites or as internal user?

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

s5s5

<apex:page standardController="Request__C" extensions="RequestCtrl" showHeader="false" sidebar="false" >
<apex:pagemessages />
<apex:form >
<apex:pageBlock >

<apex:pageBlockSection title="INFORMATION" columns="2">
<apex:inputField value="{!Request__c.What_is_your_age__c}"/>

<apex:pageBlockSectionItem HelpText="{$ObjectType.Request__c.fields.Name__c.inlineHelpText}">

<apex:inputText value="{!Request__c.Name__c}"/>
</apex:pageBlockSectionItem>


</apex:pageBlockSection>

<apex:pageBlockSection columns="2">
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockSection>

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

 

I am using this one as site.

s5s5

Hi Ankit,

 

It is not displaying help text because i used showheader="false" and if i change this one to true it will display the help text.As I have to display help text in public site i dont want showheader="true".

 

Is there any way so that even if showheader="false" it has to display help text. 

s5s5

As I want to display help text in public site i dont want to use Showheader="true" in Vf page.

 

Is there any way so that I can display the help text with help text icon in VF page.

 

Please give a proper solution for this.

sf.dev.ax1103sf.dev.ax1103

HI All,

 

      Even i need to display help text  in force.com.Any Solution for this?

bob_buzzardbob_buzzard

Your only option here is to roll your own help, as the ShowHeader attribute brings in the javascript that sets up the help.  As you are specifying the help in the page anyway, it shouldn't be too difficult to put your own image in with a tooltip shown on hover via the alt/title attributes

BenPBenP

I have a page that has the showheader set to false because it is a public site, but I'd like to add help to that.  This thread let me know that the standard helptext does not apply to my page, but is there more documentation/examples related to the custom help mentioned?

Simon ThompsonSimon Thompson

You may want to take a look at Improved Help for Salesforce

 

http://improvedapps.com/improvedhelp/

 

Improved Help allows Help Authors to:

 

  • Define rich custom help content and add context-sensitive links to repurpose underused remote 'Help Resources';
  • Provide Helped Users with a locally branded, custom help portal and Quick Access Menu to access Help Tools;
  • Push rich content, in context, direct to the point of need - in situ, embedded within helped Salesforce application pages.
bob_buzzardbob_buzzard

@Simon

 

Thanks for posting up the information.  Can I ask that in future when you do this you identify your involvement with the company providing the app - something as simple as 'you might want to check out my company's app'.

Simon ThompsonSimon Thompson

bob_buzzard wrote:

@Simon

 

Thanks for posting up the information.  Can I ask that in future when you do this you identify your involvement with the company providing the app - something as simple as 'you might want to check out my company's app'.


 

Yes of course, will do in future, good point well made.  Improved help is our app and we are an ISV partner to Salesforce.

Nicolás KacowiczNicolás Kacowicz
I just see the image of the help text but not the text. Any ideas why?
johny Bashajohny Basha
I need to provide helptext to the <apex:outputText> and is not working.
Could anyone please help me inb this ?