Open vijayk3327 opened 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"?>
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
`
Radio Group (Required) →
Radio Group (Disabled) →
Radio Group with Button Type (Required) →
Radio Group with Button Type (Disabled) →
`
Step 2:- Create Lightning Web Component : lwcRadioGroupLwc.js
` import { LightningElement } from 'lwc';
export default class LwcRadioGroupLwc extends LightningElement { value = '';
}`
Step 3:- Create Lightning Web Component : lwcRadioGroupLwc.js-meta.xml
` <?xml version="1.0" encoding="UTF-8"?>