I would like to display the pageBlockSection "ccBlock" only if the inputField "Gift_c.PaymentMethod_c" (which is a Dropdown) has a certain value - namely 'Credit Card'. I've tried many approaches but no luck so far.
<apex:pageBlockSection title="Basic Information" columns="1" >
<apex:inputField value="{!Gift__c.Contact__c}"/>
<apex:inputField value="{!Gift__c.PaymentMethod__c}" id="payMethod" >
<apex:actionSupport event="onchange" reRender="ccBlock, bankBlock" action="{!HideBlock}" />
</apex:inputField>
</apex:pageBlockSection>
<apex:pageBlockSection title="Credit Card" rendered="{!visi}" columns="1" id="ccBlock">
<apex:inputField value="{!Gift__c.CCType__c}"/>
<apex:inputField value="{!Gift__c.CCName__c}"/>
<apex:inputField value="{!Gift__c.CCNumber__c}"/>
<apex:inputField value="{!Gift__c.CCExpiryMonth__c}"/>
<apex:inputField value="{!Gift__c.CCExpiryYear__c}"/>
</apex:pageBlockSection>
visimethod look up the value of theGift__c.PaymentMethod__cfield in the database, you need to be checking the value of the record in memory (since the changes haven't been persisted yet). Do you have any kind of call toApexPages.StandardController.getRecord()in your controller's constructor? - JCD