You need to sign in to do that
Don't have an account?
Ramana123
In my visualforce page if checkbox field is disabled then I have to get the error message using custom label
My code
<apex:page StandardController="Account" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputField value="{! account.name }"/>
<apex:inputField value="{! account.label__c}"/>
<apex:inputField value="{! account.Rating}"/>
<apex:inputField value="{! account.check_box__c}" />
<apex:outputText value="{!$Label.Error_when_checkbox_is_disabled}" rendered="{!if(account.check_box__c = 'TRUE',true,false)}" />
</apex:pageBlockSection>
</apex:pageBlock>
<apex:commandButton value="save" action="{!save}"/>
</apex:form>
</apex:page>
<apex:page StandardController="Account" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputField value="{! account.name }"/>
<apex:inputField value="{! account.label__c}"/>
<apex:inputField value="{! account.Rating}"/>
<apex:inputField value="{! account.check_box__c}" />
<apex:outputText value="{!$Label.Error_when_checkbox_is_disabled}" rendered="{!if(account.check_box__c = 'TRUE',true,false)}" />
</apex:pageBlockSection>
</apex:pageBlock>
<apex:commandButton value="save" action="{!save}"/>
</apex:form>
</apex:page>
What is the error message you are seeing?Thanks
If this helps, please mark the answer as best.Thank you