radioAdded by IBM on August 8, 2013 | Version 1 (Original)
|Intended for use with one or more other radio items. A group of radio buttons presents users with a set of mutually exclusive choices. Each radio button represents one choice the user can make.
There is always one selected radio button in the group. As well, since radio buttons present a mutually exclusive set of choices, only one radio button in a group can be selected. When a user chooses a radio button, that radio button becomes selected.
A selected radio button appears filled in some way. All other radio buttons in the group appear empty.
Available options acclabel, active, bgcolor, focused, fontcolor, fontinfo, group, help, itemlocation, itemnext, itemprevious, keypress, label, labelbgcolor, labelborder, labelfontcolor, labelfontinfo, mouseover, next, previous, printbgcolor, printlabelbgcolor, printfontcolor, printlabelfontcolor, printvisible, readonly, size, suppresslabel, value, visible, xformsenabled
Example This example shows a group of three radio buttons. The first radio button is the initial choice: the value option setting is on. The buttons all belong to the group search_Group.
As shown here, only the chosen radio button needs to have a value option setting. The remaining radio buttons will receive the (default) value setting of off.
<label>Search by Name</label>
<radio sid="NUMBER RADIO">
<label>Search by Number</label>
<radio sid="OCCUPATION RADIO">
<label>Search by Occupation</label>
- This item cannot be used in conjunction with the XForms-based radiogroup, which uses xforms:itemset and xforms:item instead. The radio item is deprecated because it does not work in panes and tables, and form authors should use the radiogroup item instead.
- Group radio buttons by assigning them to the same group. Do this by including the group option in each radio button's definition, and using the same group reference in each case.
- The value option contains the status indicator. It can be either on or off. The value on indicates a status of chosen. The value off indicates a status of not chosen. The default status is not chosen.
- When the form opens, if no radio button has the status chosen, then the last radio button defined for the group becomes chosen. If multiple radio buttons are chosen, then only the last 'chosen' radio button retains that status.
- The label option defines a label to appear above the radio button and aligned with its left edge.
- When setting the size option of a radio button, the height and width of the bounding box will be based on the average character size for the font in use (set with the fontinfo option).
- The fontcolor option determines the color of the radio button fill pattern (defaults to red).
- For radio items that contain an xforms:input option, the on or off value is translated into true or false respectively when stored in the data model.