You need to sign in to do that
Don't have an account?
Bhargav 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 : </td>
<td align="left">
<apex:inputField required="true" value="{!OBJ.Round__c}" /></td>
<td align="right">Call Person Name : </td>
<td align="left"><apex:inputField required="true" value="{!OBJ.Call_Center_Person_Name__c}"/></td>
</tr>
<tr>
<td align="right">Cart Status : </td>
<td align="left"><apex:inputField required="true" value="{!bandhanOBJ.Cart_Status__c}"/></td>
<td align="right">Order Date: </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
<apex:pageBlockSection title=" Section" collapsible="true"/>
<apex:outputPanel >
<table class="tg" style=" width: 100%">
<thead></thead>
<tbody>
<tr>
<td align="right">Number : </td>
<td align="left">
<apex:inputField required="true" value="{!OBJ.Round__c}" /></td>
<td align="right">Call Person Name : </td>
<td align="left"><apex:inputField required="true" value="{!OBJ.Call_Center_Person_Name__c}"/></td>
</tr>
<tr>
<td align="right">Cart Status : </td>
<td align="left"><apex:inputField required="true" value="{!bandhanOBJ.Cart_Status__c}"/></td>
<td align="right">Order Date: </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
May I suggest you please refer the below code for reference.
- https://developer.salesforce.com/forums/?id=906F0000000BXscIAG
- https://salesforce.stackexchange.com/questions/82244/javascript-show-hide-fields-based-on-picklist-value
Hope it will be helpful.Best Regards
Rahul Kumar