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" 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]
 
postprocessing(self) source code
 
xml(self) source code

Inherited from DIV: __init__, __str__, accepts, rec_accepts, rec_clear

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]

postprocessing(self)

source code 
Overrides: DIV.postprocessing

xml(self)

source code 
Overrides: DIV.xml