You need to sign in to do that
Don't have an account?

How do I allow/disallow input to a field on a visual force page?
I am trying to control when a user is allowed to enter something into an input field on a visual force page. Something like this:
{!IF(some-condition,<apex:inputField value="{!budget.Jan_Season__c}" />,<apex:outputField value="{!budget.Jan_Season__c}" />)}
When I try to use this, it complains about EL Expression Unbalanced.
Any suggestions would be greatly appreciated.
{!IF(some-condition,<apex:inputField value="{!budget.Jan_Season__c}" />,<apex:outputField value="{!budget.Jan_Season__c}" />)}
When I try to use this, it complains about EL Expression Unbalanced.
Any suggestions would be greatly appreciated.
<pre>
<apex:inputField value="{!budget.jan_season__c}" rendered="{!someCondition}"/>
<apex:outputField value="{!budget.jan_season__c}" rendered="{!NOT(someCondition)}"/>
</pre>
Furthermore, for reference, once you start a {! ....} expression, you don't embed any further {! ..} expressions; SFDC will evaluate everything inside the {!..} as a merge field, formula operator, formula function, or constant - just as if you were coding a formula or validation rule on Force.com.