I have a boolean variable and based on whether this is true or false i want to show a field as inputfield or outputfield.
{!IF(!Showinput), <apex:outputField value="{!a.field1__c}"/>, apex:inputField value="{!a.field1__c}"/>)}
<apex:inputField value="{!a.field2__c}"/>
When i try to save i get a error
Error: Attribute value in <apex:inputField> must contain only a formula expression that resolves to a single controller variable or method
Is there any other way of achieving this
Specify both but use
renderedattribute to control which one gets rendered