I can't get my VF working quite right. Here is the structure of the row of my table. the values were hard coded in the past, but now i want to change it to values of fields. The problem that I'm having is that when I do <apex:outputText value={!opp.field__c}/> I'm getting the field label. Is there a way to avoid this? I'd prefer not to change my controller.

 <tr style="border:1px solid black">
        <td style="border:1px solid black">External Origin<br />(attributes of the environment)</td>
        <td style="border:1px solid black" valign="top">
            <div id="ctl03_divOpportunityHTML">
                    <li style='list-style:disc; margin-left:2px'><a href='#4' style='text-decoration:none'>blah</a></li>
                    <li style='list-style:disc; margin-left:2px'><a href='#5' style='text-decoration:none'>blah</a></li>
                    <li style='list-style:disc; margin-left:2px'><a href='#6' style='text-decoration:none'>blah</a></li>
        <td style="border:1px solid black" valign="top">
            <div id="ctl03_divThreatsHTML">
                    <li style='list-style:disc; margin-left:2px'><a href='#7' style='text-decoration:none'>blah</a></li>
                    <li style='list-style:disc; margin-left:2px'><a href='#8' style='text-decoration:none'>blah</a></li>
                    <li style='list-style:disc; margin-left:2px'><a href='#9' style='text-decoration:none'>blah</a></li>
  • 1
    I don't understand your question :/ what do you want to "replace with fields"? There's not a single {!merge field} in sight. You want pieces of CSS to come from some string variables? or say a textarea to appear in the table as unescaped (= dangerous) HTML? Or are you looking for stuff like {!$ObjectType.Opportunity.LabelPlural} so if "Opportunities" is translated it'll be just picked up? – eyescream Dec 11 '13 at 15:53
  • Ah, sorry. I want to replace the <ul /> with the value from a custom text area- but i don't want to include it's label – PartOfTheOhana Dec 11 '13 at 16:02
  • <apex:outputText value="{!yourField__c}" escape="false" /> ? Or outputPanel? – eyescream Dec 11 '13 at 16:05
  • 4
    You seriously get field label with outputText? weird, should be only with outputField I'd say... – eyescream Dec 11 '13 at 16:07
  • 1
    @eyescream, I've had funny-experiences with getting the label to display correctly. I think it only displays the label in a apex:pageBlockSection (maybe a apex:pageBlock too) – Scott Pelak Dec 11 '13 at 19:18

if you just want to display the values - no labels - just do this:


this will display your value - but not editable. if you want to be able to edit the values - you would want to use input text - not inputField

<li><apex:inputText value={!MyObject__c.Field__c}" /></li>

you will not get the label this way

| improve this answer | |

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.