Package gluon :: Module html :: Class FORM
[hide private]
[frames] | no frames]

Class FORM

source code

object --+    
         |    
       DIV --+
             |
            FORM
Known Subclasses:


example:

>>> form=FORM(INPUT(_name="test",requires=IS_NOT_EMPTY()))
>>> form.xml()
'<form enctype="multipart/form-data" action="" method="post"><input name="test" /></form>'

a FORM is container for INPUT, TEXTAREA, SELECT and other helpers
   
form has one important method:

    form.accepts(request.vars, session)

if form is accepted (and all validators pass) form.vars containes the
accepted vars, otherwise form.errors contains the errors. 
in case of errors the form is modified to present the errors to the user.

Instance Methods [hide private]
 
__init__(self, *components, **attributes)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
accepts(self, vars, session=None, formname='default', keepvalues=False) source code
 
hidden_fields(self) source code
 
postprocessing(self) source code
 
xml(self) source code

Inherited from DIV: __delitem__, __getitem__, __len__, __setitem__, __str__, append, fixup, insert, traverse, validate

Inherited from DIV (private): _xml

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
  tag = 'form'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *components, **attributes)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: DIV.__init__

postprocessing(self)

source code 
Overrides: DIV.postprocessing

xml(self)

source code 
Overrides: DIV.xml