Just wondering if it is possible in LWC to provide help text at a option level for radio-group or checkbox-group?
We are wanting to provide further details about why a user might select each option.
If it were something to be added in future it could be done perhaps as part of the js used for defining the options
yesNoOptions = [
{label: 'Yes', value: 'yes'},
{label: 'No', value: 'no'},
{label: 'Not provided', value: 'N/A', helptext='Select this option if you were provided a form before 01/09/2019'},
];
Interestingly the radio-group does not support field-level-help for providing help at a question level according to the lightning-input documentation which DOES offer that attribute – https://developer.salesforce.com/docs/component-library/bundle/lightning-input/specification
Best Answer
I was looking for an OOTB solution for this myself, but out of luck. Just rolled my own. Here you go.
HTML
Javascript
I'm using it from an aura component, but it would look something like this: