+ Start a Discussion

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


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 ?
<apex:inputfield  value="{!F2}" disabled="{!(F1 == 'X')}"/>
Use actionsupport onchange event for rendering on change of values.