I'm trying to take the boolean value of a checkbox field and load it into a toggle via the doInit but it's not working. Am I doing something wrong?
When I debug it says osiValue is undefined
Happy to provide more code from the cmp if you need. Thanks
Comp:
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<lightning:inputField fieldName="Override_Standard_Interest__c" label="Override_Standard_Interest__c" name="toggle" aura:id="osi"/>
<lightning:input type="toggle" checked="{!v.overrideStandardInterest}" label="" variant="label-hidden" name="toggle" onchange="{!c.jamie}"/>
Controller:
doInit : function (component, event, helper) {
var osiValue = component.find("osi").get("v.value");
component.set('v.overrideStandardInterest', osiValue);
},