function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
simon chaosimon chao 

how to get radio button to stay selected after refresh

I have 2 radio buttons, 
<label >Vegan?</label>
            <lightning:input type="radio" label="Yes" />
            <lightning:input type="radio" label="No" checked="false" />
default is set to false. 

When I select Yes and refresh the page, the button will always default to false. Is there a way that I can get it to stay as the selected choice? even after refresh? Thanks.
 
Raj VakatiRaj Vakati
Only if you store the values in database .. other wise you cannt .. 

On select of the checkbox call the serverside logic and save the values 

once the page is loaded retrive the value and set it the input