ElementTree addOption(ElementTree parent, String iname, SelectOption option)
Arguments
parent: The parent elementiname: The name of the checkbox. Remember that names starting with "kaya_" may be used by the Kaya standard library and should not be used directly by applications.option: The value and label of the checkbox, and whether it is checked by default
Usage
Adds a single labelled checkbox to a form. Labelled controls are wrapped in a division, and so the parent may be the form itself.
opt = SelectOption("Confirm action","1",false);
void(addOption(form,"confirm",opt));
/*
<div><input type='checkbox' name='confirm' value='1' id='Kay1'>
<label for='Kay1'>Confirm action</label></div>
*/