Class INPUT
source code
object --+
|
DIV --+
|
INPUT
- Known Subclasses:
-
examples:
>>> INPUT(_type='text',_name='name',value='Max').xml()
'<input value="Max" type="text" name="name"/>'
>>> INPUT(_type='checkbox',_name='checkbox',value='on').xml()
'<input checked type="checkbox" name="checkbox"/>'
>>> INPUT(_type='radio',_name='radio',_value='yes',value='yes').xml()
'<input checked value="yes" type="radio" name="radio"/>'
>>> INPUT(_type='radio',_name='radio',_value='no',value='yes').xml()
'<input value="no" type="radio" name="radio"/>'
the input helper takes two special attributes value= and
requires=.
value is used to pass the initial value for the input field. value
differs from _value because it works for checkboxes, radio, textarea and
select/option too. for a checkbox value should be '' or 'on'. for a radio
or select/option value should be the _value of the checked/selected
item.
requres should be None, or a validator or a list of validators for the
value of the field.
|
|
|
|
|
|
|
|
|
|
Inherited from DIV:
__init__,
__str__,
accepts,
rec_clear
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__
|
|
Inherited from object:
__class__
|