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
Priya 21Priya 21 

How to populate radio button value to another radio button in lwc

Hi,

I have two lwc component. In that, I have radio buttons named selected and unselected. I want to populate this button value from first lwc to second.
If I click on selected for first lwc, the radio button at second lwc should also be selected. 

I am not aware of populating values of radio button in lwc.Please share some sample codes.

ANUTEJANUTEJ (Salesforce Developers) 
Hi Priya,

I have found the below link that shows on how to pass radio group from parent component to child component so I think you can check this and modify as per your need.

>> https://salesforce.stackexchange.com/questions/236602/how-to-pass-radio-group-value-from-parent-to-child-component

I hope this helps and in case if this comes in handy can you please choose this as the best answer so that it can be useful for others in the future.

Regards,
Anutej