• Abhishek sh 29
  • NEWBIE
  • 5 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hello, 

I'm having an issue with this challenge. I'm getting the following error: 

"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."

My campingList component contains the following code:

<!-- CREATE NEW ITEM FORM -->
        <form class="slds-form--stacked">          
            <lightning:input aura:id="itemform" label="Item Name"
                             name="Name"
                             value="{!v.newItem.Name}"
                             required="true"/> 
            
            <lightning:input aura:id="itemform" label="Quantity"
                             name="Quantity"
                             value="{!v.newItem.Quantity__c}"
                             min="1"
                             type="decimal"/> 
            
            <lightning:input aura:id="itemform" label="Price"
                             name="Price"
                             value="{!v.newItem.Price__c}"
                             formatter="currency"
                            /> 
            
           
            <div class="slds-form-element">
                        <lightning:input aura:id="itemform" label="Packed"
                             name="Packed"
                             value="{!v.newItem.Packed__c}"
                             type="checkbox" 
                             />
                    </div>
            <lightning:button label="Create Item" 
                              class="slds-m-top--medium"
                              variant="brand"
                              onclick="{!c.clickCreateItem}"/>
        </form>
        <!-- / CREATE NEW ITEM FORM -->

Apparently the challenge is able to find the inputs for Price and Quantity but doesn't see the Package one.

Anybody else had the same problem? Is it an issue in my code?

Thanks
Hi, I am having trouble with the "Attributes and Expressions" module from trailhead.

Here is the challenge:
Create a Lightning Component to display a single item for your packing list.
  • Create a component called campingListItem that displays the name (ui:outputText) and the three custom fields using the appropriate output components.
  • Add an attribute named 'item' for type Camping_Item__c.
I created an component named campingListItem and this is the code:
<aura:component >
    <aura:attribute name="item" type="<my_domain>__Camping_Item__c"/>
    
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.<my_domain>__Packed__c}"/>
    <ui:outputCurrency  value="{!v.item.<my_domain>__Price__c}"/>
    <ui:outputNumber value="{!v.item.<my_domain>__Quantity__c}"/>
</aura:component>

The error that I am getting is: "Challenge Not yet complete... here's what's wrong: 
The packingListItem Lightning Component's attribute tag doesn't exist or its attributes are not set correctly."

With this, I tried to create another component, with the name "packingListItem", but It didn't work.

Can anyone help me?

Thanks,