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
magdamagda 

disable field if another check button true

Hi,

I'm creating a wizard, and i want to disable a field if the info (check box field) is checked.
I try to add a function in the controll class. And after that use setdisabled in visual force. But it is not running.
Do you have another idea?

Code:
Class
public boolean Info(){
boolean info; 
insert so;
 if (so.Info__c = true) {
info = true;  
return info;}
 else {
info = false;
return info;}
}
VisualForce Page
<apex:outputLabel value=" Editor" for="Editor"/>
<apex:inputField id="Editor" value="{!so.Editor__c}"/>
<apex:setDisable id="Editor" value="{!Info()}"/>