I'm creating a form for a community using a lightning component. I'm trying to give the case object it's field values before I send it to the apex controller. This isn't working for me.
form.cmp
<aura:component controller="CommunityCaseFormController" access="global" implements="forceCommunity:availableForAllPageTypes">
<aura:attribute name="case" type="Object" default="{}"/>
<ui:inputText aura:id="subject" label="Subject" />
<ui:inputText aura:id="description" label="Problem Description" />
<div onclick="{!c.handleCreateCase}" class="new-ticket">
<button type="button"><a href="#">Create Case</a></button>
</div>
</aura:component>
controller.js
({
handleCreateCase: function (component, event, helper) {
var c = component.get("v.case");
console.log(c);
c['Subject'] = component.find("subject").get("v.value");
c['Description'] = component.find("description").get("v.value");
console.log(c);
component.set('v.case', c);
},
})
The controller code appears to stop as soon as I start to assign attributes and values to the case object.