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
Luke ButhmanLuke Buthman 

Cannot updated checkbox on lightning:recordForm

I am unable to edit checkboxes in my lightning:recordForm component. The fields are editable and accessible by all profiles.

In the screenshot, you can see the pen icon while in View mode but the checkboxes are greyed out. Sure enough, when entering Edit mode, I am unable to change them.

This component is a sub-section of fields that live inside a tab on the record page. On the main record Details tab, those fields are editable. I have looked and not found this listed as a Known Issue.

Form in view modeForm in edit mode
Best Answer chosen by Luke Buthman
Consultant Vinay BothraConsultant Vinay Bothra

<aura:html tag="style">
        .slds-checkbox_standalone .slds-checkbox_faux {
            pointer-events: none !important;
        }
</aura:html> 

 

Use this in your component. 

All Answers

Luke ButhmanLuke Buthman
Has anyone run into this before? Here is my code.
 
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="recordId" type="Id"/>
    <aura:attribute name="fields" 
                    type="String[]" 
                    default="all my fields"/>
    
    <lightning:card >
        
        <lightning:recordForm aura:id="localCounselForm"
                              recordId="{!v.recordId}"
                              objectApiName="advpm__Matter__c"
                              fields="{!v.fields}"
                              columns="2"
                              mode="View"/>
        
    </lightning:card>
    
</aura:component>

 
Consultant Vinay BothraConsultant Vinay Bothra

<aura:html tag="style">
        .slds-checkbox_standalone .slds-checkbox_faux {
            pointer-events: none !important;
        }
</aura:html> 

 

Use this in your component. 

This was selected as the best answer
Luke ButhmanLuke Buthman
This solved my issue. Thank you Vinay! Do you have any documentation that you could point me towards so I can learn more?