Questions tagged [radio-button]

Radio buttons are elements used in forms. They let a user select exactly one of a limited number of choices.

Radio buttons are a GUI element found in many types of forms, both on the web and in standalone applications, and they are used to let the user select one option out of a set of choices. It is often useful to provide some form of visual grouping around a collection of radio buttons so as to help the user see more clearly what they are picking between.

Where there is a binary choice, it can be better to use a instead. Some types of choices may be better suited to the use of a element or a element, though radio buttons have the advantage of allowing the user to see all the possible options (and often descriptions of them) at once, which enhances discoverability at a cost of occupying more screen space.

11983 questions
2
votes
3 answers

remember radio button selections

I have the following code that works perfectly. It allows the user to 'like' or 'dislike' each post with radio buttons. The checkboxes are switches that allow the user to show/hide all liked or disliked posts. The problem is, I need the page to…
Sweepster
  • 1,829
  • 4
  • 27
  • 66
2
votes
3 answers

Getting Radio Button's Input to a Variable [Tkinter]

I have several radio buttons which have different values, and are tight to one variable. Even though the variable should take button's value when selected, it doesn't. Here is the code I'm using. mimeType = StringVar() wave =…
JKR
  • 69
  • 1
  • 1
  • 10
2
votes
1 answer

Remove class not working with MooTools

I'm using the following piece of code in my webpage to change the class of select elements depending on the choice of a radio button. The part where I add the class works fine but the other (where I remove them) doesn't work. I get no error in the…
Bruno
  • 8,497
  • 13
  • 38
  • 55
2
votes
1 answer

HTML Form submit for Radio Buttons

I have a basic HTML form that takes input from the user about his age, gender, dob, email and contact number. I save it into the local storage as employeeData by making it an object in an array. [{},{},{}]. I also add a User_id that is calculated by…
Deathgods
  • 31
  • 3
2
votes
1 answer

How can I bind a dynamic collection of questions with a dynamic collection of answers to a view model?

I have an app that is a multiple choice survey. The questions are loaded from a database and the answer choices are also loaded from a database. I want to bind the response to the model, but I'm not sure how to achieve this. Here is my ViewModel and…
PJ Slauta
  • 53
  • 5
2
votes
2 answers

How to click on a radio button using Selenium

I'm trying to click on a radio button in selenium java but it's not clicking. This is the inspect on the radio button:
resha
  • 78
  • 1
  • 7
2
votes
1 answer

jquery buttonset add class to checked element label

I have run into a problem that I am unsure of how to resolve. According to my debugging using firefox and simple console logs I am doing it correctly. I can see the specified div id for the selected radio button toggle when I select each button.…
jas-
  • 1,801
  • 1
  • 18
  • 30
2
votes
3 answers

Selecting multiple radio buttons (through jquery, javasscript?)

I currently have a form with lets say 5 radio button entries (see below). What im looking archive is the following: - Being able to choose multiple radio buttons - lets say 3 and submit the form. Currently I got it working fine with PHP, SQL, but im…
user1231561
  • 3,239
  • 6
  • 36
  • 55
2
votes
1 answer

How can I allow just one input selection in react?

Right now only one selection is allowed between all inputs. I'm not sure how to solve this. I thought the name was supposed to match between all inputs, but perhaps I'm wrong. If I remove it, then there is an endless number of input selections…
agm
  • 91
  • 1
  • 6
2
votes
1 answer

Using Radio Button Values in Javascript

Following on from my previous question, I am now struggling to pass the values of my radio buttons to my JavaScript function. The desired output is to have both a 'BMR' value, and a 'recommended caloric intake' value, which is simply BMR x activity…
2
votes
2 answers

How to get text of the checked id from radio group using view binding?

I had gone through this and found a common answer i.e int selectedId = radioGroup.getCheckedRadioButtonId(); radioButton = (RadioButton) findViewById(selectedId); Toast.makeText(MyAndroidAppActivity.this, …
2
votes
2 answers

How to add tabulation to the hidden choices from a ConditionalPanel in Shiny?

I am creating an app which has one checkboxInput that if you click on it, you will have anoother options to select. These options are hidden by a conditionalPanel. You will only see them if you click the checkbox. However, I was wondering if it is…
emr2
  • 1,436
  • 7
  • 23
2
votes
4 answers

ASP javascript radiobutton enable disable not included in postback ajax

Here is the problem. I have a radiobutton group (two radiobuttons). These guys are initialy disabled. When the user clicks a checkbox, I dynamically enable radiobuttons in javascript by setting rbtn.disabled = false; and doing the same for it's…
0xDEAD BEEF
  • 2,074
  • 7
  • 31
  • 46
2
votes
1 answer

Drupal 7 form api radio box/checkbox image select

I'm trying to make a radio box display an image next to it when selected with drupal 7 form api,and I've no idea where to start. I'd appreciate some help.Thank you This is the code I'm using:
John
  • 21
  • 1
  • 3
2
votes
2 answers

How to check the Radio Button in Cypress. The regular check() is not working

I bumped into a problem with Cypress. I just couldn't check the radio button. I have 7 questions with Yes or No radio buttons. By default, all buttons are checked to "NO". I need to check the "YES" options, it will send an API call to the backend…
Anastasion
  • 55
  • 1
  • 6