0

To my previous Question, I did some more debugging and ended up log with OnClick value: on

Good thing is, I have my LightningApp on the Internet Explorer which helped to get to the console logs(Chrome browser getting me the correct log value).

Aura.cmp

<aura:attribute name="selectedRecordType" type="String"/>
...
<aura:iteration items="{!v.RTypeList}" var="rType"> 
<span class="slds-radio">
    <input type="radio" aura:id="radioId"  
           id="{!rType}" name="options" value="{!rType}" 
           onclick="{!c.selectedRadio}"/>
    <label class="slds-radio__label" for="{!rType}">
       <span class="slds-radio--faux"></span>
       <span class="slds-form-element__label">{!rType}</span>
    </label>
   </span>
</aura:iteration>

Aura.Js

selectedRadio: function(component, event, helper){
    var temp = event.target.value;
    component.set('v.selectedRecordType',temp);
    console.log('OnClick value: ' +temp);
}

I am trying to set the value for selectedRecordType attribute, that way I can use it in other button which fires the force:recordCreate event. But I am ended up with the log: OnClick value: on

I have also tried using: event.getSource().getElement().value but I always gets an runtime error:

[Object doesn't support property or method 'getSource']

When I debug Lightning App via Google Chrome, on the console, I can see the selected radio button values as they get select. But why it is not working this way on Internet Explorer???? On IE, I can only get OnClick value: on each and every time, but what causing this to work on Chrome and not on IE???????

  • 1
    Any reason why you're not using lightning:radioGroup? – sfdcfox Feb 14 '18 at 19:50
  • No reason. I have started implementing in this approach, so trying to finish it off. – Arnold Jr. Feb 14 '18 at 19:52
  • Huh. It works in my dev org copied verbatim. – sfdcfox Feb 14 '18 at 19:55
  • :( oh lord. That's what happened in my Chrome browser. I can see the onclick value picked from the selected radio button, but on IE, I cannot get it, thus Lightning for Outlook fails. – Arnold Jr. Feb 14 '18 at 19:57
  • I've created lightning-for-outlook, since it seems specific to this feature. – sfdcfox Feb 14 '18 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.