Powered by SmartDoc

CKRadioButton

Creates a radio button. This element must be used within CKForm or HTML form.

Required attributes: selectionand value, or checked

Attributes of CKRadioButton
Attribute Type Description
name String Name that identifies the radio button's group.
checked true/false If neither valuenor selectionattribute is nil and the value of selectionis equal to that of value, the check box is checked.
value String When the check box is checked, the value of valueattribute is set to the component by the method specified by selectionattribute.
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 checkedattribute.

<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