+ Start a Discussion
Nurav1982Nurav1982 

Disabling a field on VF page based on value from another field

Hello,

We have two fields F1 and F2 in our VF page.
Both of them are picklists.
We would like to ensure that F2  is disabled (but visible) whenever F1's selected value is "X".

Can someone provide direction as to how this can be achieved ?
sachin_dreamoncloudsachin_dreamoncloud
<apex:inputfield  value="{!F2}" disabled="{!(F1 == 'X')}"/>
Use actionsupport onchange event for rendering on change of values.