HTMLDocument.addOption3kaya
Adds a labelled checkbox to a form.
Usage
ElementTree addOption( ElementTree parent, String iname, SelectOption option )
Arguments
parent The parent element
iname 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
Overview
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>
*/
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.