Home | Trees | Index | Help |
|
---|
|
object
--+ |StanzaPayloadObject
--+ | Form
A JEP-0004 compliant data form.
Additionally to the direct access to the contained fields via the fields
attribute,
Form
object provides an iterator and mapping interface for field access. E.g.:
for field in form: ...
or:
field = form['field_name']
Method Summary | |
---|---|
Initialize a Form object. | |
__contains__(self,
name)
| |
__getitem__(self,
name_or_index)
| |
__iter__(self)
| |
Field |
Add a field to the form. |
Item |
Add and item to the form. |
Complete the XML node with self content. | |
Form |
Get a deep copy of self . |
Form |
Make a "submit" form using data in self . |
Inherited from StanzaPayloadObject | |
libxml2.xmlNode or libxml2.xmlDoc |
Get the XML representation of self . |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Instance Variable Summary | |
---|---|
list of Field |
fields : the fields in the form. |
unicode |
instructions : instructions for a form user. |
list of Item |
items : items in a multi-item data form. |
list of Field |
reported_fields : list of fields returned in a multi-item data form. |
unicode |
title : form title. |
type : form type ("form", "submit", "cancel" or "result"). |
Class Variable Summary | |
---|---|
tuple |
allowed_types = ('form', 'submit', 'cancel', 'result')
|
unicode |
xml_element_name : name for the XML element provided by the class. |
unicode |
xml_element_namespace : namespace URI for the XML element provided
by the class. |
Method Details |
---|
__init__(self,
xmlnode_or_type='form',
title=None,
instructions=None,
fields=None,
reported_fields=None,
items=None)
Initialize a |
add_field(self, name=None, values=None, field_type=None, label=None, options=None, required=False, desc=None, value=None)Add a field to the form.
|
add_item(self, fields=None)Add and item to the form. |
complete_xml_element(self, xmlnode, doc)Complete the XML node withself content.
|
copy(self)Get a deep copy ofself .
|
make_submit(self, keep_types=False)Make a "submit" form using data in Remove uneeded information from the form. The information removed includes: title, instructions, field labels, fixed fields etc.
|
Instance Variable Details |
---|
fieldsthe fields in the form.
|
instructionsinstructions for a form user.
|
itemsitems in a multi-item data form.
|
reported_fieldslist of fields returned in a multi-item data form.
|
titleform title.
|
typeform type ("form", "submit", "cancel" or "result"). |
Class Variable Details |
---|
allowed_types
|
xml_element_namename for the XML element provided by the class.
|
xml_element_namespacenamespace URI for the XML element provided by the class.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 26 17:57:36 2005 | http://epydoc.sf.net |