You need to sign in to do that
Don't have an account?
Nandu
Challenge not yet complete... here's what's wrong: The campingList component doesn't appear to have a Name input field in the form using a Lightning Base component.
<form class="slds-form--stacked">
<lightning:input type="text" aura:id="newItemForm" label="Name"
name="Name"
value="{!v.newItem.Name}"
required="true"/>
<lightning:input type="number" aura:id="newItemForm" label="Price"
name="Price"
min="0.1"
formatter="currency"
step="0.01"
value="{!v.newItem.Price__c}"
messageWhenRangeUnderflow="Enter an amount that's at least $0.10."/>
<lightning:input aura:id="newItemForm" label="Packed"
name="Packed" type="checkbox"
checked="{!v.newItem.Packed__C}" value="{!v.newItem.Packed__C}"
/>
<lightning:input type="number" aura:id="newItemForm" label="Quantity"
name="Quantity"
min="1"
step="1"
value="{!v.newItem.Quantity__c}"
placeholder="0"/>
</form>
<lightning:input type="text" aura:id="newItemForm" label="Name"
name="Name"
value="{!v.newItem.Name}"
required="true"/>
<lightning:input type="number" aura:id="newItemForm" label="Price"
name="Price"
min="0.1"
formatter="currency"
step="0.01"
value="{!v.newItem.Price__c}"
messageWhenRangeUnderflow="Enter an amount that's at least $0.10."/>
<lightning:input aura:id="newItemForm" label="Packed"
name="Packed" type="checkbox"
checked="{!v.newItem.Packed__C}" value="{!v.newItem.Packed__C}"
/>
<lightning:input type="number" aura:id="newItemForm" label="Quantity"
name="Quantity"
min="1"
step="1"
value="{!v.newItem.Quantity__c}"
placeholder="0"/>
</form>
please try below code. Hope this helps.
Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
1. This issue is regarding fixes required in campingListForm.cmp
2. Ensure
<aura:attribute name="newItem" type="Camping_Item__c"
default="{'sobjectType':'Camping_Item__c','Name': '','Quantity__c': 0,
'Price__c': 0,'Packed__c': false}"></aura:attribute>
3. Ensure form input fields having <lightning:input> tags (you may follow any CSS for the form layout)
<lightning:input aura:id="itemform" label="Name" value="{!v.newItem.Name}" required="true"/>
<lightning:input type="number" min="1" aura:id="itemform" label="Quantity" value="{!v.newItem.Quantity__c}" required="true"/>
<lightning:input aura:id="itemform" label="Price" Formatter="currency" value="{!v.newItem.Price__c}"/>
<lightning:input aura:id="itemform" label="Packed?" type="checkbox" checked="{!v.newItem.Packed__c}"/>