0

I need to include a custom help text which includes double quotes like this= To claim materials, use checkbox labeled “Claim as shown".

Vf Code

 <c:FormFields label="Claim as Shown" rendered="{!if(check == 'Yes',true,false)}" isHelpText="true" showHelpMethod="true" helpText="To claim materials, use checkbox labeled &quot;Claim as shown&quot;.">

Any idea how to display quotations within help text? The custom message is shown as below in VF page:- enter image description here

1
  • 2
    Could you please add the VF code here so that we can identify the problem and then provide the best suitable and best answer?
    – Amit Singh
    Jul 17, 2018 at 4:38

2 Answers 2

0

As a workaround you can use two single quotes.

Visualforce page:

<apex:page >
    <apex:outputPanel layout="inline">Test "text"</apex:outputPanel>
    <br/>
    <c:testcomp helpText="To claim materials, use checkbox labeled ''Claim as shown''" />
</apex:page>

Visualforce component:

<apex:component >
    <apex:attribute name="helpText" type="String" description="The variable to represent a single account in the iteration."/>
    <apex:outputPanel layout="inline">{! helpText }</apex:outputPanel>
</apex:component>

Result (in Google Chrome):

enter image description here

1
  • Thanks, This one has resolved the issue without any additional code.Nice workaround Jul 17, 2018 at 13:03
0

I am not quite sure which tag you are using on VF page to display the help text but you can use escape="false" to display the double quotes.

<apex:outputText value="{!message}" escape="false" />
<apex:pageMessages escape="false" ></apex:pageMessages>

In controller

message = 'To claim materials, use checkbox labeled “Claim as shown".';
apexpages.addmessage(new apexpages.message(apexpages.severity.Info, 'To claim materials, use checkbox labeled “Claim as shown".'));

enter image description here

2
  • 2
    Downvotes without comments will not help anyone. Jul 17, 2018 at 6:07
  • Thanks for the above suggestion. I am planning to use this approach in next phase of our work process. I tried using the above code for this one piece and it worked as well. Jul 17, 2018 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .