I am trying to use IF Else condition in VF Page. It is working for IF block but I am not sure how to use else block.
Scenario is IF(Field="Hard Hat"), Show check box image; else show unchecked box image. It is working for checked scenario but when Hard Hat is not selected it is giving me 5 or 6 images of unchecked boxes.
Below is my code..
<div class="formdiv">
<apex:repeat value = "{!ehsdetails}" var = "ehsdetail">
<apex:outputPanel rendered="{!IF(ehsdetail.EHSD_PPE__c='Hard Hat', true, false)}">
<div class="inputdiv"><img src="/img/checkbox_checked.gif" class="frminput"/>Hard Hat</div>
</apex:outputPanel>
<apex:outputPanel rendered="{!IF(ehsdetail.EHSD_PPE__c!='Hard Hat', true, false)}">
<div class="inputdiv"><img src="/img/checkbox_unchecked.gif" class="frminput"/>Hard Hat</div>
</apex:outputPanel>
</apex:repeat>
Please help on this.
<>
for not equals. We dont have if else blocks in vf page . We have to render using IF() only