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
Raquib SFRaquib SF 

Challenge Not yet complete... here's what's wrong: The campingList component doesn't appear to have a Packed checkbox field in the form using a Lightning Base component.

Hello guys,

I am getting the below errow then trying to complete one of the modules: Lightning Components Basics, Input data using forms

Challenge Not yet complete... here's what's wrong: 
The campingList component doesn't appear to have a Packed checkbox field in the form using a Lightning Base component.

Although i am using the base lightning comp:
                        
<lightning:input type="checkbox"
                                         aura:id="campaingItem"
                                         label="Packed"
                                         name="campaignPacked"
                                         value="{!v.newItem.Packed__c}"                                        
                                         />

Please help

 
jigarshahjigarshah
You might want to check the following.

1. You have a Packed field created on the campingList Object.
2. Ensure that the name you are referring to within the value attribute of your <lightning:input> component refers to the value of name attribute of the  <aura:attribute> tag. So if the attribute is as follows
<aura:attribute name="item" type="Camping_Item__c" required="true"/>
Then your code should be referring to as below.
<lightning:input type="checkbox" 
                                         aura:id="campaingItem"
                                         label="Packed"
                                         name="campaignPacked"
                                         value="{!v.item.Packed__c}"                                        
                                         />

Also, you might want to check if you have included the Packed__c field in the default attribute value of the <aura:attribute> tag.
<aura:attribute name="newExpense" type="Expense__c"
     default="{ 'sobjectType': 'Expense__c',
                    'Name': '',
                    'Amount__c': 0,
                    'Client__c': '',
                    'Date__c': '',
                    'Reimbursed__c': false }"/>
Please do not forget to mark this thread as SOLVED and answer as the BEST ANSWER if it helps address your issue.
Anne BLOUET 14Anne BLOUET 14
Hello,

I've had the same message, and it works with the checked attribute :

<lightning:input type="checkbox" aura:id="packed" label="Packed" name="Packed" checked="{!v.newItem.Packed__c}"  />
AnuSFDCDevloperAnuSFDCDevloper
Hi,
I had the same error, i changed the VALUE attribute to "CHECKED" attribute. It worked then :)