Find your content:

Search form

You are here

help text when mouseover on picklist values

 
Share

I have a requirement for the community portal. It says that for picklist fields, when the user is checking the available options in the piclist, when the user mouse over each one of the values, the system should show a help text (like a tooltip for example).

Is there anyway to do so using Javascript or Jquery? Could someone point me on the right direction please?

I know I can show the standar salesfoce help text on my visualforce page, but I have around 30 options in the picklist, so its quite confusing to do it with this standard funcionality.

Any help is appreciated!

All the best,


Attribution to: nocovi

Possible Suggestion/Solution #1

If you define your picklist options using apex:selectOption, you can use the title parameter of each to specify hovertext. example:

<apex:selectList id="typeSelect" size="1" value="{!typeSelect}" >
    <apex:selectOption title="helptext for hover" itemLabel="{!$ObjectType.Key_Contact__c.LabelPlural}" itemValue="Key_Contact__c" />
    <apex:selectOption title="helptext for hover" itemLabel="{!$ObjectType.Roster__c.LabelPlural}" itemValue="Roster__c" />
    <apex:selectOption title="helptext for hover" itemLabel="{!$ObjectType.Team__c.LabelPlural}" itemValue="Team__c" />
    <apex:selectOption title="helptext for hover" itemLabel="{!$ObjectType.User.LabelPlural}" itemValue="User" />
</apex:selectList>

Attribution to: RenegadeCoder
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/33825

My Block Status

My Block Content