web.web.form.Checkbox

Package web :: Package web :: Module form :: Class Checkbox |
[hide private]
[frames] | no frames]

# Class Checkbox

source code

    object --+
             |
         Input --+
                 |
                Checkbox

Checkbox input.

    >>> Checkbox('foo', value='bar', checked=True).render()
    '<input checked="checked" type="checkbox" id="foo_bar" value="bar" name="foo"/>'
    >>> Checkbox('foo', value='bar').render()
    '<input type="checkbox" id="foo_bar" value="bar" name="foo"/>'
    >>> c = Checkbox('foo', value='bar')
    >>> c.validate('on')
    True
    >>> c.render()
    '<input checked="checked" type="checkbox" id="foo_bar" value="bar" name="foo"/>'

Instance Methods | [hide private]
__init__(self, name, *validators, **attrs) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
get_default_id(self) | source code
render(self) | source code
set_value(self, value) | source code
get_value(self) | source code
Inherited from `Input`: `addatts`, `get_type`, `is_hidden`, `rendernote`, `validate` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, name, *validators, **attrs) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### get_default_id(self) | source code
Overrides: Input.get_default_id

### render(self) | source code
Overrides: Input.render

### set_value(self, value) | source code
Overrides: Input.set_value

### get_value(self) | source code
Overrides: Input.get_value