You need to sign in to do that
Don't have an account?
Sean Barker
Connect Components with Events
Hi there,
I've been trying to complete the above trailhead module, but have hit a brick wall with the following error.
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.
Am I creating this error by including the AuraID on the lightning:input field?
Am I going mad? the campingList contains the campingform component and there is the following on there;
<lightning:input aura:id="Name" name="Name" label="Name" value="{!v.item.Name}" />
Apart from not passing the trailhead, the form is functional.
I've been trying to complete the above trailhead module, but have hit a brick wall with the following error.
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.
Am I creating this error by including the AuraID on the lightning:input field?
Am I going mad? the campingList contains the campingform component and there is the following on there;
<lightning:input aura:id="Name" name="Name" label="Name" value="{!v.item.Name}" />
Apart from not passing the trailhead, the form is functional.
var validItem = component.find('itemForm').reduce(function (validSoFar, inputCmp) {
// Displays error messages for invalid fields
inputCmp.showHelpMessageIfInvalid();
return validSoFar && inputCmp.get('v.validity').valid;
}, true);
return(validItem);
<lightning:input aura:id="itemForm" name="Name" label="Name" value="{!v.newItem.Name}" required="true" />
I was missing the exclamation point after the left curly brace { in the value tag:
Incorrect: Correct:
Once I fixed that, I receive a similar error for the Packed input and it was because I used the word value instead of checked. See below.
Incorrect: Correct:
After calling it 'newItem' the error disappeared. Sean did the same, but didnt mention this naming explicitly and I overlooked it at first sight.
Failing markup: Working markup: