You need to sign in to do that
Don't have an account?
Connect Components with Events unable to check challenge with Name field using an inputText UI component.
I'm trying to complete the Connect Components with Events trailhead and am getting this message when checking the challenge:
Challenge Not yet complete... here's what's wrong:
The campingList component doesn't have a Name field using an inputText UI component.
This does not make sense to me as this challenge moved the input form to a new bundle. Why does it seem to want a inputText UI component in the campingList component?
I am using an inputText UI control in the form component and including the component on the CampingList component.
I feel I'm missing a step. Ideas?
Thanks.
Challenge Not yet complete... here's what's wrong:
The campingList component doesn't have a Name field using an inputText UI component.
This does not make sense to me as this challenge moved the input form to a new bundle. Why does it seem to want a inputText UI component in the campingList component?
I am using an inputText UI control in the form component and including the component on the CampingList component.
I feel I'm missing a step. Ideas?
Thanks.
All Answers
Now I have this error:
Challenge Not yet complete... here's what's wrong:
The campingListForm component isn't using the 'submitForm' controller action for the button press.
Here is the code for the submit button and the controller....
Any ideas as to my issue?
The campingListForm component isn't using the 'submitForm' controller action for the button press."
Please Add more on:
CampingListForm.cmp
<div class="slds-form-element">
<ui:button label="Submit Form"
class="slds-button slds-button--brand"
press="{!c.submitForm}"/>
</div>
CampingListFormController.js
submitForm : function(component, event, helper) {
var validCamping = true;
// Name must not be blank
var nameField = component.find("name");
var expname = nameField.get("v.value");
if ($A.util.isEmpty(expname)){
validCamping = false;
nameField.set("v.errors", [{message:"Camping Item name can't be blank."}]);
}
else {
nameField.set("v.errors", null);
}
var priceField = component.find("price");
var price = priceField.get("v.value");
if ($A.util.isEmpty(price) || isNaN(price) || (price <= 0.0)){
validCamping = false;
priceField.set("v.errors", [{message:"Camping Item price can't be blank."}]);
}
else {
priceField.set("v.errors", null);
}
var quantityField = component.find("quantity");
var quantity = quantityField.get("v.value");
if ($A.util.isEmpty(quantity) || isNaN(quantity) || (quantity <= 0)){
validCamping = false;
quantityField.set("v.errors", [{message:"Camping Item quantity can't be blank."}]);
}
else {
quantityField.set("v.errors", null);
}
if(validCamping){
helper.createItem(component);
}
}
Hope this will help
Everything actually works just fine, but I can't manage to get past the challenge. As the original poster said, the error message makes no sense, since I thought the point of the exercise is to put the UI component into the campingListForm component - yet the error is pointing to the campingList component.
Anyone know what's up with this?
I'm trying to complete the Connect Components with Events trailhead and am getting this message when checking the challenge:
Challenge Not yet complete... here's what's wrong:
The campingList component doesn't have a Name field using an inputText UI component.
This does not make sense to me as this challenge moved the input form to a new bundle. Why does it seem to want a inputText UI component in the campingList component?
I am using an inputText UI control in the form component and including the component on the CampingList component.