You need to sign in to do that
Don't have an account?
theitdeptrocks
HTML as part of an IF or CASE
Hi all,
I'm trying to build a VF page in which some of the formatting changes depending on the result of IF and CASE statements. As part of the true or false results, I'm trying to add line breaks <br />, include links <a href...>, or even throw in some images. I am currently presented with this error:
Syntax error. Found '<'
Example code:
If(MyField__c = 'Pass', <a href="www.myurl.com">You passed!</a>,'')
Any ideas?
You may want to code something like -
<apex:outputPanel rendered="{!IF(condition here), true,false)}">
... Add HTML link here that you want to conditionally render.
</apex:outputPanel>
All Answers
You may want to code something like -
<apex:outputPanel rendered="{!IF(condition here), true,false)}">
... Add HTML link here that you want to conditionally render.
</apex:outputPanel>
Jackpot! Exactly what I was looking to do. Thanks for your help!!!