Home | Trees | Indices | Help |
|
---|
|
object --+ | html.XmlComponent --+ | 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 generates an insert form:: SQLFORM(db.table) generates an update form:: record=db.table[some_id] SQLFORM(db.table, record) generates an update with a delete button:: SQLFORM(db.table, record, deletable=True) if record is an int:: record=db.table[record] optional arguments: :param fields: a list of fields that should be placed in the form, default is all. :param labels: a dictionary with labels for each field, keys are the field names. :param col3: a dictionary with content for an optional third column (right of each field). keys are field names. :param linkto: the URL of a controller/function to access referencedby records see controller appadmin.py for examples :param 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 |
|
|||
|
|
|||
widgets = <Storage {'multiple': <class 'web2py.gluon.sqlhtml.M
|
|||
FIELDNAME_REQUEST_DELETE =
|
|||
FIELDKEY_DELETE_RECORD =
|
|||
ID_LABEL_SUFFIX =
|
|||
ID_ROW_SUFFIX =
|
|||
Inherited from |
|
|||
Inherited from |
|
SQLFORM(db.table, record=None, fields=['name'], labels={'name': 'Your name'}, linkto=URL(r=request, f='table/db/')
|
similar FORM.accepts but also does insert, update or delete in DAL. but if detect_record_change == True than: form.record_changed = False (record is properly validated/submitted) form.record_changed = True (record cannot be submitted because changed) elseif detect_record_change == False than: form.record_changed = None
|
generates a SQLFORM for the given fields. Internally will build a non-database based data model to hold the fields. |
|
widgets
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Aug 4 00:47:01 2011 | http://epydoc.sourceforge.net |