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
Riby VargheseRiby Varghese 

how to enable a checkbox field in and output field.

Hi,
 I have a checkbox field called Pin_Status___c, and I want to use this field in output field, but it's not enabled when using it the output field.
          <apex:pageBlockSectionItem >
              <apex:outputLabel value="PIN" id="test">
                <!--<apex:panelGrid columns="2">-->
<apex:outputPanel>
                <!--<apex:inputField value="{!Account.PIN__c}" styleClass="omni" style="width: 55px;"/>-->
                <apex:outputField value="{!Account.PIN_Status__c}" styleClass="omni" id="test" />
                  </apex:outputPanel></apex:outputLabel>
               <!-- </apex:panelGrid>-->
          </apex:pageBlockSectionItem>
Nitish KulkarniNitish Kulkarni

Hi Riby

If you use outputfield for check box then it will create as a read only field.

You have to use inputfield if you want to change check box true or false.

You can do this by following code

 

<apex:inputField value="{!Account.PIN_Status__c}" styleClass="omni" id="test" />