4

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,

3

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.