• Gabriella Vasconcellos 9
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi Guys!
I want to show on my component a Checkbox Group. The values are already defined by the Record. My code, for now, is this one with all the picklists that work perfectly -
How I can add those 4 checkboxes?


<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
   <lightning:card>
       
           <lightning:layout multipleRows="true">
          <lightning:layoutItem size="6">
       <lightning:recordForm recordId="{!v.recordId}" objectApiName="Lead" fields="My_Commodity_Interests_include__c" />
       </lightning:layoutItem>
           <lightning:layoutItem size="6">     
               <lightning:recordForm recordId="{!v.recordId}" objectApiName="Lead" fields="Non_Ferrous_Metals__c"/>
</lightning:layoutItem>
       <lightning:layoutItem size="6">
           <lightning:recordForm recordId="{!v.recordId}" objectApiName="Lead" fields="Ferrous_Steel__c"/>
               </lightning:layoutItem>
           <lightning:layoutItem size="6">
               <lightning:recordForm recordId="{!v.recordId}" objectApiName="Lead" fields="Fertilizers__c"/>
               </lightning:layoutItem>
       <lightning:layoutItem size="6">
                          <lightning:recordForm recordId="{!v.recordId}" objectApiName="Lead" fields="I_am_interested_in_hearing_about__c"/>
</lightning:layoutItem>
       <lightning:layoutItem size="6">
                          <lightning:recordForm recordId="{!v.recordId}" objectApiName="Lead" fields="Light_Metals__c"/>
               </lightning:layoutItem>
       
                 
               
             
      <aura:attribute name="options" type="List" default="[
    {'label': 'Ross', 'value': 'option1'},
    {'label': 'Rachel', 'value': 'option2'}
    ]"/>
    <aura:attribute name="value" type="List" default="option1"/>

    <lightning:checkboxGroup name="Checkbox Group"
                             label="Checkbox Group"
                             options="{! v.options }"
                             value="{! v.value }"
                             onchange="{! c.handleChange }"/>        
       
            
           </lightning:layout>
  
          
     
   </lightning:card>