Thursday, 11 February 2016

How to show help text in a vf Page?

Below is code to show 

 <apex:outputPanel id="msgBelowHeader" Styleclass="container_12 clearfix" rendered="{!isPreDistributorVisible}">
                <div style="padding-left: 50px;">
                <b>Your Preffered Distiributor is {!con.account.Preferred_Distributor__c} </b>
                <apex:outputPanel rendered="{!HelpInstructions !=null}">
                <span class="helpButton" id="example-_help">
                <img src="/s.gif" class="helpOrb" style="position: initial;"/>         
                   <script>sfdcPage.setHelp('example','{!HelpInstructions}');</script>
                </span>  
                </apex:outputPanel>
                </div>
            </apex:outputPanel>

Declare a variable HelpInstructions in the class to populate help text to make dynamic also we can add html style sheet to that variable.

KEEP EXPLORING ... 

No comments: