checkbox.formwidget
A
<checkbox class="formwidget"
only returns data when it
is checked. When harvesting, if a checkbox has no value, it's label is
used as value.
see
menuitems for
<menuitem type="checkbox"
Note: when seeding, checkboxes are never unchecked.
Such is the nature of a checkbox: if it is not checked,
it doesn't mean it should be unchecked; it means nothing.
If you need a switch, use radiobuttons.
Example:
result:
seed: r1/yes/one
cgi: r1=yes
Additional Attributes:
name
The name of the widget. Used as the name of the variable in CGI
value
The value of the widget. Used as the value of the variable in CGI
-
onvalidate
pseudo event handler. should point to a method to execute
for validation. when validating, the method will receive a bucket
with a single seed in it, reflecting the name, value and label of this
element.
Additional Methods: