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
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.