| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
XmlComponent --+
|
DIV --+
|
INPUT
INPUT Component
examples::
>>> INPUT(_type='text', _name='name', value='Max').xml()
'<input name="name" type="text" value="Max" />'
>>> INPUT(_type='checkbox', _name='checkbox', value='on').xml()
'<input checked="checked" name="checkbox" type="checkbox" value="on" />'
>>> INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml()
'<input checked="checked" name="radio" type="radio" value="yes" />'
>>> INPUT(_type='radio', _name='radio', _value='no', value='yes').xml()
'<input name="radio" type="radio" value="no" />'
the input helper takes two special attributes value= and requires=.
:param value: 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.
:param requires: should be None, or a validator or a list of validators
for the value of the field.
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
tag =
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Handling of attributes (normally the ones not prefixed with '_'). Nothing to postprocess yet. May be overridden by subclasses
|
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sun Mar 4 22:11:59 2012 | http://epydoc.sourceforge.net |