You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
aura:if not working on toggle
Hello all,
I am trying to show another div based on a checkbox toggle but its not working. I tried using the aura:if but the div never renders. I am able to use the aura:if is true in other places on the form but not for the checkbox toggle.
Cheers,
P
I am trying to show another div based on a checkbox toggle but its not working. I tried using the aura:if but the div never renders. I am able to use the aura:if is true in other places on the form but not for the checkbox toggle.
<div class="modalCheckContainer"> <span> <label class="slds-checkbox--toggle slds-grid checkbox-left"> <span class="slds-form-element__label slds-m-bottom--none">file attached?</span> <input id="attfile__c" type="checkbox" name="checkbox" aria-describedby="fileattatoggle" value="{!v.fileatttoggle}" /> <span id="Toggle" class="slds-checkbox--faux_container" aria-live="assertive"> <span class="slds-checkbox--faux"></span> <span class="slds-checkbox--on"></span> </span> </label> </span> </div>
Cheers,
P
Component
Controller
All Answers
I am just trying show this div after the user selects the toggle check box to true.
So I was trying somethink like this
Try this
Component:-
Controller
Css
Regards,
Uttpal Chandra
Thank you for the reply. Does it matter that my field type is 'checkbox'?
Regards,
P
Component
Controller