I have a beginner's question..
I'm trying to make a VF PageBlOckSection render by the following logic:
IF Opportunity.Cancellation__c == TRUE AND Opportunity.Paid_Upfront__c == TRUE than Render 2 fields (Amount and Expiry Date)
IF Opportunity.Cancellation__c == TRUE AND Opportunity.Paid_Upfront__c == FALSE than Render 1 fields (Expiry Date)
IF Opportunity.Cancellation__c == FALSE AND Opportunity.Paid_Upfront__c == TRUE than Render 2 fields (Amount and Expiry Date)
IF Opportunity.Cancellation__c == FALSE AND Opportunity.Paid_Upfront__c == FALSE than do not render.
However I cannot make it work by the desired logic... I'm using this code: I'll appreciate any advice!
Thanks, Jonathan
<apex:pageBlockSection title="Please fill the Expiry Date & Upfront Amount" columns="1" rendered="{!IF(AND(!Opportunity.Paid_Upfront__c == TRUE, !Opportunity.Cancellation__c != TRUE), TRUE, FALSE)}">
<apex:inputField value="{!opportunity.Subscription_Expiry_Date__c}"/>
<apex:inputField value="{!opportunity.Amount}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Please fill the Expiry Date" columns="1" rendered="{!IF(AND(!Opportunity.Paid_Upfront__c == FALSE, !Opportunity.Cancellation__c != TRUE), TRUE, FALSE)}">
<apex:inputField value="{!opportunity.Subscription_Expiry_Date__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Please fill the Expiry Date" columns="1" rendered="{!IF(AND(!Opportunity.Paid_Upfront__c == TRUE, !Opportunity.Cancellation__c == TRUE), TRUE, FALSE)}">
<apex:inputField value="{!opportunity.Subscription_Expiry_Date__c}"/>
<apex:inputField value="{!opportunity.Amount}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>