Skip to main content
12 votes
Accepted

lightning:radioGroup is allowing multi-select

You've forgotten a required attribute. The radioGroup is grounded in HTML's <input type="radio" />, which uses a "name" attribute to determine groups. If you forget to specify the name, the ...
sfdcfox's user avatar
  • 500k
9 votes

How to setup help text for radio button with onmousehover

While creating the SelectOption for the apex:selectRadio you can pass the HelpText as HTML string as title in the label parameter with this constructor SelectOption(value, label) of SelectOption Apex ...
Saroj Bera's user avatar
  • 14.8k
8 votes
Accepted

Can't get data from lightning:radioGroup

Try this Component: <aura:component> <aura:attribute name="options" type="List" default="[ {'label': 'Option1', 'value': '1'}, {'label': 'Option2', 'value': '2'} ]"/&...
A.Bretto's user avatar
  • 492
7 votes
Accepted

Why all selected radio buttons are reset when another is selected?

Radio buttons are checked based on the uniqueness of the name attribute. Set different names for each section and you'll be fine. For example like this <div key={task.Id}> <lightning-...
ytiq's user avatar
  • 4,627
6 votes
Accepted

LWC update toggle checked/unchecked attribute from JS

Just bind the checked attribute to javascript property. <lightning-input data-id="toggle2" type="toggle" label="TOGGLE2" checked={checked} message-toggle-active="" message-toggle-inactive="">&...
Rahul Gawale's user avatar
  • 12.2k
6 votes

How to add a radio button in lwc datatable?

Using: <lightning-dattable max-row-selection="1"> According to the lwc datatable documentation: Radio buttons are used when maxRowSelection is 1.
Gian Vallejos's user avatar
4 votes

Labeling radio Options in visualforce

Use the itemLabel attribute on apex:selectOption: <apex:selectRadio label="Update Existing Contact" value="{!createOrUpdateSite}"> <apex:selectOption itemValue="Update Existing Contact"...
Ben's user avatar
  • 226
3 votes
Accepted

Select only one radio button in a Visualforce page

Your radio button needs a name. All radio buttons with the same name behave as a group, of which only one can be selected. <input type="radio" name="checkboxGroup" value="{!...
sfdcfox's user avatar
  • 500k
3 votes
Accepted

Radio Button is not working when using same component twice on same page in lightning

The name is supposed to link all radio group items together. This is standard HTML behavior. Since the name is always the same, the browser thinks these inputs all belong to the same "group." Instead,...
sfdcfox's user avatar
  • 500k
3 votes
Accepted

Radio Button within Iteration - When user selects radiobutton, store the associated sourceId in attribute 'accountId'

component <aura:component> <aura:attribute name="options1" type="List" default="['1','2','3']"/> <aura:attribute name="options" type="List" default="[{'label': '', 'value': '...
User6670's user avatar
  • 3,035
3 votes
Accepted

Why does <lightning:radioGroup returns String rather than Boolean

Because the HTML specification says that "value" is a "String." You need to convert it to a Boolean value if you want it as a Boolean. I know it's kind of a silly rule, but you have to remember that ...
sfdcfox's user avatar
  • 500k
3 votes
Accepted

Lightning Web Components - Radio button "checked" not retaining when navigating back and forth

You have to bind the checked attribute of the radio group to your data (e. g. via adding a checked property to your options object) in order to keep track of the selected dom element. Updated your ...
Renji-xD's user avatar
  • 2,791
3 votes
Accepted

Lightning radio selector in iteration disappears when option selected in another row

You need a unique name for each group: <lightning:radioGroup name="{!'triggerType'+index}" variant="label-hidden" options="{!v.triggerTypeOptions}" ...
sfdcfox's user avatar
  • 500k
3 votes

Can't get data from lightning:radioGroup

Add value attribute to the radioGroup component and bind it some attribute or sObject field. <aura:component> <aura:attribute name="value" type="string" default=""/> <aura:...
Venky's user avatar
  • 634
3 votes
Accepted

Lightning radio button NOT getting the correct value (or modifying it)?

Well, after spending few extra hours than usual, I was able to fix it. The problem with my code lies within the document.querySelector. As per my <input type="radio" implementation, I do not need ...
SatyaV's user avatar
  • 1,533
3 votes
Accepted

SelectRadio how to display radio buttons side by side

Presumably this is the part that matters: <apex:selectRadio styleClass="radioOpt" value="{!selectedRT}" id="outMailshot_Frequency__c"> <apex:selectOption itemValue="INCOME" itemLabel=" ...
Dan Jones's user avatar
  • 7,237
3 votes
Accepted

How can I get the value of the selected radio button?

id attributes are usually changed in lightning. You can use another attribute probably accessKey or any other data-attribute that could tell you which row was actually checked. You can maintain it as ...
Sachin Hooda's user avatar
  • 1,642
2 votes

Displaying Picklist as radiobutton on VF

You can change the dropdown to radio buttons with JavaScript also. First hide the dropdown, then take the data out of the elements and create the <input type="radio"/><label/><br/> ...
Saroj Bera's user avatar
  • 14.8k
2 votes

How to disable Radio Buttons (fetched from a Picklist Field) on a Visualforce page?

One solution is to use isDisabled property of SelectOption class. Check the SelectOption Constructors detail page, there is a constructor which can take 3 arguments (value, label, isDisabled). So if ...
Saroj Bera's user avatar
  • 14.8k
2 votes
Accepted

Close and reopen VF page

Theoretically you should just need a refresh no? Commit the template value to your record, refresh the page, requery the record, and render the template. Get rid of the re-render altogether and it ...
gNerb's user avatar
  • 9,568
2 votes
Accepted

Issue with Radio Button with text input

I was able to finally sort out where the on, was coming from, there were two problems with the form. The form was referencing "Amount" twice in the last line, once in the radio button and once in the ...
zuzannamj's user avatar
  • 14.4k
2 votes

AMPscript for Radio Button with text input

Considering you need this for the form that creates an opportunity mentioned in your previous question, you can use the following: <script runat="server"> Platform.Load("Core","1.1.1"); try{...
zuzannamj's user avatar
  • 14.4k
2 votes

How to check the appropriate radio button based on its value

You should use apex:selectRadio for your use case as below <!-- Page: --> <apex:page controller="FeedbackCtrl"> <apex:form> <apex:selectRadio value="{!rating}"> ...
Santanu Boral's user avatar
2 votes
Accepted

Labels not showing on radio button inside a Flow (called by lightning component)

Just an idea, did you check that the actual text it's not there? Inspect in the browser. May be some CSS is affecting the text and making it white, so it is there but you can't see it.
Matías Quintana's user avatar
2 votes
Accepted

Radio button requires two clicks to "check" even though conditional template renders

Instead of adding a checked attribute to the first input radio, bind it with the input property as: <input onchange={handleRadioChange} type="radio" data-id="option-1&...
Raul's user avatar
  • 18.9k
2 votes

unable to set the first record as selected in html table

If you want to use the radio button, use lightning-radio-group or <input type="radio">. Currently, you are using the checkbox. The main difference is that for a radio group with the ...
Oleksandr Berehovskyi's user avatar
2 votes
Accepted

Why does the radio button has checked = false , but is selected on screen?

tl;dr Your usage of the "checked" and "disabled" attributes is incorrect The longer version In HTML, the "checked" attribute is used to set the default/initial value of a ...
Derek F's user avatar
  • 63.2k
1 vote
Accepted

LWC Modal on Radio 'onchange' event does not retain the checked value

There are a couple of issues in your code, You have an assignment in renderedCallback causing unnecessary overrides each time the template is re-rendered by a reactivity change. You do not have ...
Mohith Shrivastava's user avatar
1 vote
Accepted

how to copy values to field in aura:iteration dynamically using Radio button with multiple rows

i achieved by using onclick event on child tr instead radio button. i used HTML data-attribute to bind parent row index and child row index, so i got both indexes when ever click on any child row ...
sdandamud1's user avatar
  • 2,713
1 vote
Accepted

Facing problem in single select radio button?

Use Input Tag for Radio Button as shown below and no need to use Script.. it can be done by Apex Controller itself <td> <input name="isRadio" type="radio" value="{!rep.ocr.Contact.Id}" ...
Dave's user avatar
  • 480

Only top scored, non community-wiki answers of a minimum length are eligible