0

Need a small help in displaying the checkbox after the field name while using lightning:inputfield

 <lightning:recordEditForm aura:id="editForm" recordId="5000D0000024fvcQAA" objectApiName="Case">

        <fieldset class="slds-form-element slds-form-element_compound">
            <div class="slds-form-element__control">
                <div class="slds-form-element__row">
                    <div class="slds-size_1-of-2">
                        <div class="slds-form-element">
                            <div class="slds-form-element__control">
                                <lightning:inputField fieldName="Files_with_explanation_attached__c"/>
                            </div>
                        </div>
                    </div>
                    <div class="slds-size_1-of-2">
                        <div class="slds-form-element">
                            <div class="slds-form-element__control">
                                <lightning:inputField fieldName="customer_date__c"/>
                            </div>
                        </div>
                    </div>
                </div>

Output : enter image description here

We saw that the checkbox is displayed first and then the field name, Files_with_explanation_attached__c is a checkbox here Can we have the fieldname and then the checkbox to be displayed as how it looks in normal layout in LEX?

We need Like this :

enter image description here

  • 1
    Here is the one of the answer salesforce.stackexchange.com/questions/229399/… – salesforce Developer Mar 4 '19 at 10:34
  • You need to add label separately – salesforce Developer Mar 4 '19 at 10:35
  • The only issue I am seeing with the help text icon , it is coming with the checkbox. How do i remove that ? – Quddus Mar 4 '19 at 11:47
  • And I cant do .slds-button__icon to display none because it removes for all . With adding label separately the help text needs to be arranged as well – Quddus Mar 4 '19 at 11:54
-1

Add this line density="compact", it should be like this:

 <lightning:recordEditForm aura:id="editForm" recordId="5000D0000024fvcQAA" objectApiName="Case" density="compact">
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.