vijayk3327 / LWC

1 stars 0 forks source link

how to set/get required value of ‘Radio Group’ & ‘Radio Group Button Type’ and display selected value as enabled/disabled or selected/deselected horizontally uses of ‘lightning-checkbox-group’ tags in lightning web component – LWC Salesforce #65

Open vijayk3327 opened 1 year ago

vijayk3327 commented 1 year ago

In this post we are going to learn about how to set/get required value of ‘Radio Group’ & ‘Radio Group Button Type’ and display selected value as enabled/disabled or selected/de-selected horizontally uses of ‘lightning-checkbox-group’ tags in lightning web component – LWC Salesforce.

→ Get source code live demo link:-

Step 1:- Create Lightning Web Component : lwcRadioGroupLwc.html

` `

Step 2:- Create Lightning Web Component : lwcRadioGroupLwc.js

` import { LightningElement } from 'lwc';

export default class LwcRadioGroupLwc extends LightningElement { value = '';

get options() {
    return [
        { label: 'Tutorial w3web.net', value: 'option1' },
        { label: 'Salesforce LWC', value: 'option2' },
        { label: 'Aura Component', value: 'option3' },
    ];
}

}`

Step 3:- Create Lightning Web Component : lwcRadioGroupLwc.js-meta.xml

` <?xml version="1.0" encoding="UTF-8"?>

45.0 true lightning__AppPage lightning__RecordPage lightning__HomePage ` **Step 4:- Create Lightning Application : lwcRadioGroupLwcApp.app** ` ` **[→ Get source code live demo link:-](https://www.w3web.net/set-required-value-of-radio-group-in-lwc/)**