| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
html.DIV --+
|
html.FORM --+
|
SQLFORM
SQLFORM is used to map a table (and a current record) into an HTML form
given a SQLTable stored in db.table
SQLFORM(db.table) generates an insert form
record=db(db.table.id==some_id).select()[0]
SQLFORM(db.table,record) generates an update form
SQLFORM(db.table,record,deletable=True) generates an update
with a delete button
optional arguments:
fields: a list of fields that should be placed in the form, default is all.
labels: a dictionary with labels for each field. keys are field names.
linkto: the URL of a controller/function to access referencedby records
see controller appadmin.py for examples
upload: the URL of a controller/function to download an uploaded file
see controller appadmin.py for examples
any named optional attribute is passed to the <form> tag
for example _class, _id, _style, _action,_method, etc.
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
SQLFORM(db.table,
record=None,
fields=['name'],
labels={'name':'Your name'},
linkto=ULR(r=request,f='table/db/')
|
same as FORM.accepts but also does insert, update or delete in SQLDB
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Tue Mar 25 20:33:08 2008 | http://epydoc.sourceforge.net |