function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Medhanie Habte 37Medhanie Habte 37 

Adding an event in the Lighting Component Superbadge - Step 4

I am working on the Lightning Component Superbadge and have gotten to step 4, I however, seem to be stuck on the FormSubmit event.
I've written it like this.
 
<aura:event type="COMPONENT"> <aura:attribute name="formsubmit" type="Boat__c[]"/> </aura:event>

But get this message.
Challenge Not yet complete... here's what's wrong: The FormSubmit event isn't configured correctly. There is something missing or improperly configured in the FormSubmit.evt file.
Best Answer chosen by Medhanie Habte 37
Medhanie Habte 37Medhanie Habte 37
Figured it out!
 
<aura:event type="COMPONENT">
    <aura:attribute name="formData" type="Object[]"/>
</aura:event>

 

All Answers

Kurt Schmid 4Kurt Schmid 4
Great question - reminds me to complete that superbadge.  Coming back from Dreamforce and wanting to stay connected to our hub.  
Sven FrancornelSven Francornel
Hello,

The name and type of the attribute are wrong. You would need to read the description for the event carefully for the naming and the attribute type.

Use a new event c:FormSubmit named formsubmit with an Object attribute named formData to pass the selected boatTypeId—as a property of formData—from BoatSearchForm to its parent component BoatSearch. Do this via a controller function called onFormSubmit() attached to the Search button.

Best regards
Medhanie Habte 37Medhanie Habte 37
Figured it out!
 
<aura:event type="COMPONENT">
    <aura:attribute name="formData" type="Object[]"/>
</aura:event>

 
This was selected as the best answer