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

How to uncheck a radio button on its second click Angular 2+

I am trying to implement Radio button uncheck on second click in Angular 2+ as done here in angularjs. I have an array of objects that get displayed using *ngFor, therefore I have multiple radio button groups in one form. I need an implementation…
YulePale
  • 6,688
  • 16
  • 46
  • 95
2
votes
3 answers

Struts2 How to create a table by iterating a list such that each row has a radio button?

I am trying to create a table to display some data using iterator over my list from action class. Each row has the properties of each object in the list. …
Vasu
  • 4,862
  • 8
  • 42
  • 48
2
votes
1 answer

How to align radio buttons with text to the left?

Still working on a survey form project and am having trouble with button alignment. As this example below shows, the first radio button should be in line with the text to the left which is the question: However, I have played around with display…
Jerry D
  • 381
  • 11
  • 25
2
votes
1 answer

how to pull selected radio button in a jsp

I have two radio buttons, and depending on which one is selected I want to send them to a specific jsp page. I do not know how to pull which button is selected in my java class. Here is the jsp:
novicePrgrmr
  • 18,647
  • 31
  • 81
  • 103
2
votes
4 answers

Reset radioButtons in shiny to empty value

Is it possible in shiny to reset radioButtons to an empty value (i.e. as if the radiobuttons would not have been clicked and the default value was empty (selected = ""))? I tried reset("btn") with shinyjs() and updateRadioButtons(session,…
2
votes
4 answers

JQuery and ASP:RadioButton and .change() not working

Found a similar question but it didn't solve my issue. I am trying to call a .change() event to display some hidden text when a user selects a RadioButton. I tried this in JSFiddle and it works with normal forms but can't seem to get it to work with…
Valien
  • 1,125
  • 2
  • 17
  • 38
2
votes
1 answer

howto group radio buttons in a custom adapter?

My question is similar to this question and since I was unable to find a satifying answer I would like to put up my question explicitly. I have a custom adapter which takes an array of strings and has to populate the the list (defined in my…
ric03uec
  • 145
  • 4
  • 12
2
votes
2 answers

How to show checked radio button in Razor edit view Asp net core mvc

Despite of Asp net core code in Razor view: @model List @foreach (SelectListItem item in Model) {
user1855805
  • 137
  • 1
  • 1
  • 9
2
votes
2 answers

Check radio button based on php variable

I am able to set the value of a text field from a php variable so that when the page is refreshed, the text field remains filled in like so:
However, I would like…
Paradox
  • 4,602
  • 12
  • 44
  • 88
2
votes
1 answer

Form in HTML with button assigns the value of the last button, no matter which one was selected

I want to create a form with HTML with different types of inputs (such as name, surname, dates, and radio-button options), and when I want to print the object with the data inputted in the form on the console, the value from the radio-buttons is not…
Marija
  • 21
  • 1
2
votes
2 answers

How do I change paragraph text using JavaScript, depending on which radio button is checked in a form?

What I´m trying to achieve is to have 1 question with 4 possible answers to choose from (radio buttons). When the user presses the button after the form, I want a paragraph to tell them more about the choice they made. I´ve targeted the button, the…
jjberg
  • 73
  • 8
2
votes
2 answers

Javascript: script for menu not reacting when menu is dynamically created

I have this menu, statically, it is as follows:
Jessica Chambers
  • 1,246
  • 5
  • 28
  • 56
2
votes
3 answers

How can I deselect an input type='button' in JavaScript

In an HTML form, I have the following section, which I want to act like radio buttons but appear like regular buttons. Minimum Skill Level:
John Biddle
  • 2,664
  • 2
  • 15
  • 25
2
votes
1 answer

How to enable disable multiple DOM elements using Javascript

I'm trying to enable many radio buttons using DOM manipulation to avoid click each time on all buttons to enable them. I try this: document.getElementById("on").disabled = true; and: on-off-btn.off.active.setAttribute("enable", ""); Without…
Kalipso
  • 31
  • 5
2
votes
1 answer

Problem with naming the variables of filtered data in ShinyApp

Hope you all are well. I'm facing a small problem with ShinyApps. I have attached a picture of what i require. I'm basically targeting cyl variable of mtcars data. If i press 4 from it, i require the filtered data having 4 along-with rest of…
Doctor
  • 59
  • 1
  • 11
1 2 3
99
100