You need to sign in to do that
Don't have an account?
karthic sankar 9
Enable dependent input field by choosing a value in a picklist.
Hi Guys,
I tried a lot and stuck up in a loop, can any one kindly please help me?
When I select "Y" for Monday_Availability__c, then Pre_Vet_Reviews__c should be enabled. This is the code I have. Kindly help.
<apex:pageBlock title="Availability">
<div style="float:left; width: 800px; margin-right: 20px;">
<apex:pageBlockTable value="{!ListValues}" var="a">
<apex:actionRegion >
<apex:inputField value="{!a.Monday_Availability__c}" id="pb1"/>
<apex:actionSupport event="onchange" rerender="pb1" />
</apex:actionRegion>
</apex:pageBlockTable>
</div>
<apex:pageBlock title="Core Categories">
<div styleClass="labelCol vfLabelColTextWrap">
<table border="1px" width="100%" height="80%" style="page-break-inside:auto;">
<apex:repeat value="{!ListValues}" var="a" >
<tr>
<th>Pre-Vet Reviews</th>
<th>180 Mins</th>
<td><apex:inputField value="{! a.Pre_Vet_Reviews__c}" rendered="{!a.Monday_Availability__c=='Y'}" required="{!a.Monday_Availability__c=='Y'}"/></td>
</tr>
</apex:repeat>
</table>
</div>
</apex:pageBlock>
I tried a lot and stuck up in a loop, can any one kindly please help me?
When I select "Y" for Monday_Availability__c, then Pre_Vet_Reviews__c should be enabled. This is the code I have. Kindly help.
<apex:pageBlock title="Availability">
<div style="float:left; width: 800px; margin-right: 20px;">
<apex:pageBlockTable value="{!ListValues}" var="a">
<apex:actionRegion >
<apex:inputField value="{!a.Monday_Availability__c}" id="pb1"/>
<apex:actionSupport event="onchange" rerender="pb1" />
</apex:actionRegion>
</apex:pageBlockTable>
</div>
<apex:pageBlock title="Core Categories">
<div styleClass="labelCol vfLabelColTextWrap">
<table border="1px" width="100%" height="80%" style="page-break-inside:auto;">
<apex:repeat value="{!ListValues}" var="a" >
<tr>
<th>Pre-Vet Reviews</th>
<th>180 Mins</th>
<td><apex:inputField value="{! a.Pre_Vet_Reviews__c}" rendered="{!a.Monday_Availability__c=='Y'}" required="{!a.Monday_Availability__c=='Y'}"/></td>
</tr>
</apex:repeat>
</table>
</div>
</apex:pageBlock>
<td><apex:inputField value="{! a.Pre_Vet_Reviews__c}" rendered="{! If(a.Monday_Availability__c=='Y',true,alse)}" required="{!a.Monday_Availability__c=='Y'}"/></td>
something like that