function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bhargav SurapaneniBhargav Surapaneni 

how to hide fields based on picklist value selected in vf

How to hide fields based on picklist value selected in vf. Here is my code
 <apex:pageBlockSection title=" Section"  collapsible="true"/>
               <apex:outputPanel > 
               <table class="tg" style=" width: 100%">
                 <thead></thead>
                 <tbody>
                     <tr>                                                                  
                        <td align="right">Number :&nbsp;&nbsp;</td>
                        <td align="left">
                        <apex:inputField required="true" value="{!OBJ.Round__c}"   /></td>                       
                        <td align="right">Call Person Name :&nbsp;&nbsp;</td>
                        <td align="left"><apex:inputField required="true" value="{!OBJ.Call_Center_Person_Name__c}"/></td>                                    
                     </tr>
                     <tr>                                           
                         <td align="right">Cart Status :&nbsp;&nbsp;</td>
                         <td align="left"><apex:inputField required="true" value="{!bandhanOBJ.Cart_Status__c}"/></td>  
                         <td align="right">Order Date:&nbsp;&nbsp;</td>
                         <td align="left"><apex:inputField value="{!bandhanOBJ.Order_Date__c}"/></td>                                 
                     </tr>                   
                 </tbody>
             </table>
          </apex:outputPanel>        
          <apex:outputPanel id='panel1'>
         <apex:inputfield value=  />
          </apex:outputpanel>
          <apex:outputPanel id='panel2'>
          <apex:inputfield value= />
          </apex:outputpanel>
In the above code based on cart staus picklist value I want to hide panel1 and panel2. Please help me how we can achieve this.
Thanks in Advance
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Bhargav Surapaneni,

May I suggest you please refer the below code for reference. Hope it will be helpful.

Best Regards
Rahul Kumar