0

Their is a requirement for creating two ui input radio buttons although i achieve that but here iam facing a unique problem the input radio is not deselected on the selection of second one both buttons are selected if i select one then next then both are selected any help on this is highly appreciated.

Here is my code for input radio boxes.

<fieldset class="slds-form-element">
    <div class="slds-form-element__control">
        <ui:inputRadio label="TechnicalUser" aura:id = "tokenRadioAuraId" change="{!c.myOpps}"/>
        <ui:inputRadio label="BusinessUsers"/>

    </div>
</fieldset>

Thanks

1 Answer 1

0

You need name attribute to group radio buttons together. Only 1 radio can be selected when grouped. Try as below:

<fieldset class="slds-form-element">
    <div class="slds-form-element__control">
        <ui:inputRadio name="sample" label="TechnicalUser" aura:id = "tokenRadioAuraId" />
        <ui:inputRadio name="sample" label="BusinessUsers"/>
    </div>
</fieldset>
1
  • Thanks This works for me can you please let me know how i put aura if condition here because if i select one radio button then the value which is selected through previous button still exist. Commented Aug 21, 2019 at 10:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .