Skip to main content
Original question:

How I Set up my aura attribute

<aura:attribute name="LoanStarted__c" type="Condo_Review__c" default ="{'Condo_Review__c': ''}" />

<aura:attribute name="ApplicationStarted__c" type="Condo_Review__c" default ="{'Condo_Review__c': ''}" />

I had to set them up like this for others because I couldn’t type in the textboxes for the other fields. 

RadioGroup

          <th scope="col" class="gap" width="500px" >

                        <label class="slds-form-element__label"><span class="slds-required">*</span>Has the loan been started?</label>

                        <lightning:radioGroup id = "select" options="{!v.options}" value="{!v.LoanStarted__c.Condo_Review__c}" onchange="{!c.handleRadioClick}"  />

          </th>

HandleRadioClick

({

handleRadioClick : function(){

     var opts = document.getElementById('select').value;

}

})

Error: 

Error

This page has an error. You might just need to refresh it. Action failed: c:Condominium_Submission_Requester$controller$handleRadioClick [Cannot read property 'value' of null] Failing descriptor: {c:Condominium_Submission_Requester$controller$handleRadioClick}

 

 
2 Antworten
  1. 22. Juni 2018, 15:51

    Even this will work 

    ({

    handleRadioClick : function(cmp,event,helper){

    var changeValue = event.getParam("value");

    }

    })

     
0/9000