m (E00a555c-1e5d-4eb3-b26b-5be8dc16c657 moved page DevOps:Doc/FlexForm/1.0.0/input/radio to input/radio without leaving a redirect: Text replacement - "1.0.0" to "1.0")
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
radio
 
radio
 
===Type===
 
===Type===
_input
+
input
 
===Synopsis===
 
===Synopsis===
 
How to use radio buttons
 
How to use radio buttons
 
===Description===
 
===Description===
_input elements of type radio are generally used in radio groups—collections of radio buttons describing a set of related options. Only one radio button in a given group can be selected at the same time. Radio buttons are typically rendered as small circles, which are filled or highlighted when selected.
+
input elements of type radio are generally used in radio groups—collections of radio buttons describing a set of related options. Only one radio button in a given group can be selected at the same time. Radio buttons are typically rendered as small circles, which are filled or highlighted when selected.
 
===Parameters===
 
===Parameters===
_input type="radio"
+
input type="radio"
  
 
All other valid HTML5 attributes are allowed
 
All other valid HTML5 attributes are allowed
Line 15: Line 15:
 
<p>Select a maintenance drone:</p>
 
<p>Select a maintenance drone:</p>
 
<div>
 
<div>
   <_input type="radio" id="huey" name="drone" value="huey" />
+
   <input type="radio" id="huey" name="drone" value="huey" />
   <_label for="huey">Huey</_label>
+
   <label for="huey">Huey</label>
 
</div>
 
</div>
  
 
<div>
 
<div>
   <_input type="radio" id="dewey" name="drone" value="dewey" checked="checked" />
+
   <input type="radio" id="dewey" name="drone" value="dewey" checked="checked" />
   <_label for="dewey">Dewey</_label>
+
   <label for="dewey">Dewey</label>
 
</div>
 
</div>
  
 
<div>
 
<div>
   <_input type="radio" id="louie" name="drone" value="louie" />
+
   <input type="radio" id="louie" name="drone" value="louie" />
   <_label for="louie">Louie</_label>
+
   <label for="louie">Louie</label>
 
</div>
 
</div>
 
</syntaxhighlight>
 
</syntaxhighlight>
 
<p>Select a maintenance drone:</p>
 
<p>Select a maintenance drone:</p>
 
<div>
 
<div>
   <_input type="radio" id="huey" name="drone" value="huey" />
+
   <input type="radio" id="huey" name="drone" value="huey" />
   <_label for="huey">Huey</_label>
+
   <label for="huey">Huey</label>
 
</div>
 
</div>
  
 
<div>
 
<div>
   <_input type="radio" id="dewey" name="drone" value="dewey" checked="checked" />
+
   <input type="radio" id="dewey" name="drone" value="dewey" checked="checked" />
   <_label for="dewey">Dewey</_label>
+
   <label for="dewey">Dewey</label>
 
</div>
 
</div>
  
 
<div>
 
<div>
   <_input type="radio" id="louie" name="drone" value="louie" />
+
   <input type="radio" id="louie" name="drone" value="louie" />
   <_label for="louie">Louie</_label>
+
   <label for="louie">Louie</label>
 
</div>
 
</div>
 
===Note===
 
===Note===
ws-class-props
Line 1: Line 1:
 
+
{{Doc properties
 +
|Doc subject=DevOps:Doc/FlexForm
 +
|Subject version=1.0,1.1
 +
|Doc parent=DevOps:Doc/FlexForm/1.0/input
 +
|Doc sort order=110
 +
|Doc target group=User
 +
|Doc synopsis=How to use radio buttons
 +
}}
ws-page-props
Line 1: Line 1:
{{Doc properties
+
 
|Doc subject=DevOps:Doc/FlexForm
 
|Doc parent=DevOps:Doc/FlexForm/1.0.0/input
 
|Doc sort order=110
 
|Doc target group=User
 
|Subject version=1.0.0
 
}}
 

Latest revision as of 11:02, 23 November 2022

Name

radio

Type

input

Synopsis

How to use radio buttons

Description

input elements of type radio are generally used in radio groups—collections of radio buttons describing a set of related options. Only one radio button in a given group can be selected at the same time. Radio buttons are typically rendered as small circles, which are filled or highlighted when selected.

Parameters

input type="radio"

All other valid HTML5 attributes are allowed

Example

<p>Select a maintenance drone:</p>
<div>
  <input type="radio" id="huey" name="drone" value="huey" />
  <label for="huey">Huey</label>
</div>

<div>
  <input type="radio" id="dewey" name="drone" value="dewey" checked="checked" />
  <label for="dewey">Dewey</label>
</div>

<div>
  <input type="radio" id="louie" name="drone" value="louie" />
  <label for="louie">Louie</label>
</div>

Select a maintenance drone:

 
 
 
 
 
 

Note

Radio buttons are similar to checkboxes, but with an important distinction — radio buttons are grouped into a set in which only one radio button can be selected at a time, whereas checkboxes allow you to turn single values on and off. Where multiple controls exist, radio buttons allow one to be selected out of them all, whereas checkboxes allow multiple values to be selected.

Links

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio