Creates a radio button. This element must be used within CKForm or HTML form.
Required attributes: selection
and value
, or checked
Attribute | Type | Description |
---|---|---|
name |
String |
Name that identifies the radio button's group. |
checked |
true/false |
If neither value nor selection attribute is nil and the value of selection is equal to that of value , the check box is checked. |
value |
String |
When the check box is checked, the value of value attribute is set to the component by the method specified by selection attribute. |
selection |
String |
Object that the user chose from the check box. |
enabled |
true/false |
If the value is false, the element appears but is not active. |
This is a sample with checked
attribute.
<cgikit name=Form> <cgikit name=Radio1>One</cgikit> <cgikit name=Radio2>Two</cgikit> <cgikit name=Radio3>Three</cgikit> <cgikit name=Submit></cgikit> </cgikit>
Form : CKForm { } Radio1 : CKCheckbox { name = "radio"; checked = checkedOneTwoThree; } Radio2 : CKCheckbox { name = "radio"; checked = checkedOneTwoThree; } Radio3 : CKCheckbox { name = "radio"; checked = checkedOneTwoThree; } Submit : CKSubmitButton { }
class Checkbox < CKComponent !)_!)_attr_accessor :checkedOneTwoThree end