You need to sign in to do that
Don't have an account?
Brian Findlay 14
Trailhead complaining about Packed checkbox missing. Connect Components with Events in Lightning Components Basics module
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.
Continue to receive this error on the Trailhead even though the packed checkbox field is there. Here are the two relevant Lightning components. Obviously, Trailhead is looking for a certain parameter or attribute that is missing but is not specified what exactly it is looking for. Any help would be appreciated.
The campingList component doesn't appear to have a Packed checkbox field in the form using a Lightning Base component.
Continue to receive this error on the Trailhead even though the packed checkbox field is there. Here are the two relevant Lightning components. Obviously, Trailhead is looking for a certain parameter or attribute that is missing but is not specified what exactly it is looking for. Any help would be appreciated.
Camping List <aura:component > <aura:handler name="addItemEvent" event="c:addItemEvent" action="{!c.handleAddItem}"/> <aura:attribute name="items" type="Camping_Item__c[]"/> <aura:attribute name="newItem" type="Camping_Item__c" default="{'sobjectType' : 'Camping_Item__c', 'Quantity__c' : 0, 'Price__c' : 0}"/> <!-- BOXED AREA --> <fieldset class="slds-box slds-theme--default slds-container--small"> <legend id="newCampItemForm" class="slds-text-heading--small slds-p-vertical--medium"> Add Camping Item </legend> <!-- CREATE NEW CAMPING ITEM FORM --> <form class="slds-form--stacked"> <div class="slds-form-element slds-is-required"> <div class="slds-form-element__control"> <lightning:input type="text" aura:id="itemform" label="Camping Item Name" value="{!v.newItem.Name}" required="true"/> </div> </div> <div class="slds-form-element slds-is-required"> <div class="slds-form-element__control"> <lightning:input type="number" aura:id="itemform" label="Quantity" name="itemform" min="1" step="1" value="{!v.newItem.Quantity__c}" placeholder="0"/> </div> </div> <div class="slds-form-element"> <div class="slds-form-element__control"> <lightning:input type="number" aura:id="itemform" label="Price" value="{!v.newItem.Price__c}"/> </div> </div> <div class="slds-form-element"> <lightning:input type="checkbox" aura:id="itemform" label="Packed?" value="{!v.newItem.Packed__c}"/> </div> <div class="slds-form-element"> <lightning:button label="Create Camping Item" class="slds-button slds-button--brand" onclick="{!c.clickCreateItem}"/> </div> </form> <!-- / CREATE NEW CAMPING ITEM FORM --> </fieldset> <!--<div class ="slds-card slds-p-top--meduim">--> <!--<header class ="slds-card__header">--> <!--<h3 class = "slds-text-heading--small">Items</h3>--> <!--</header>--> <!--<section class ="slds-card__body">--> <!--<div id="list" class = "row">--> <!--<aura:iteration items="{!v.items}" var="item">--> <!--<c:campingListItem item="{!item}"/>--> <!--</aura:iteration>--> <!--</div>--> <!--</section>--> <!--</div>--> <!-- i do not think this html is needed any longer --> <c:campingListForm /> </aura:component>
Camping List Form <aura:component > <aura:attribute name="newItem" type="Camping_Item__c" default="{ 'sobjectType': 'Camping_Item__c', 'Name': '', 'Packed__c': false, 'Price__c': '0', 'Quantity__c': '0' }"/> <aura:registerEvent name="addItem" type="c:addItemEvent"/> <div> <form class="slds-form--stacked"> <div class="slds-form-element slds-is-required"> <div class="slds-form-element__control"> <lightning:input type="text" aura:id="itemform" label="Camping Item Name" value="{!v.newItem.Name}" required="true"/> </div> </div> <div class="slds-form-element slds-is-required"> <div class="slds-form-element__control"> <lightning:input type="number" aura:id="itemform" label="Quantity" name="itemform" min="1" step="1" value="{!v.newItem.Quantity__c}" placeholder="0"/> </div> </div> <div class="slds-form-element"> <div class="slds-form-element__control"> <lightning:input type="number" aura:id="itemform" label="Price" value="{!v.newItem.Price__c}"/> </div> </div> <div class="slds-form-element"> <lightning:input type="checkbox" aura:id="itemform" label="Packed?" value="{!v.newItem.Packed__c}"/> </div> <div class="slds-form-element"> <lightning:button label="Create Camping Item" onclick="{!c.clickCreateItem}"/> </div> </form> </div> </aura:component>
Using the following as a guide for that format:
You can use something like the following to pass:
All Answers
Using the following as a guide for that format:
You can use something like the following to pass: