Home | Trees | Index | Help |
|
---|
Package lemon :: Package html :: Module form :: Class Form |
|
Form Class - Designed to be over-ridden to form custom forms made up of html.Field derivatives.
Method Summary | |
---|---|
__init__(self,
name,
action,
method,
stickyData,
enctype,
populate)
| |
__getitem__(self,
name)
| |
Add a submit button to the actions part of the form with the name 'action'. | |
Adds the field specified in the method to the fields array of the form. | |
Return a dictionary containing the names and valuse of the fields. | |
frozen(self,
action)
| |
If name is a string ,retruns the field object named 'item'. | |
hidden(self)
| |
html(self,
text,
showActions)
| |
Function designed to be over-ridden in the derived classes to provide custom validation for each individual form. | |
Return a tuple containing the names of the form fields in the order they were added. | |
Sets up the form with the values in the form dictionary. | |
Constructor to be overridden in derived classes to construct a form object... | |
Return a dictionary suitable for use in a lemon.html.template class. | |
Internal function to make sure no wierd values have been set. | |
Return a tuple containing the values of the form fields in the order they were added. |
Method Details |
---|
addAction(self, action)Add a submit button to the actions part of the form with the name 'action'. This is the preferred way to add submit buttons rather than specifying them as field objects and calling addField(). |
addField(self, field)Adds the field specified in the method to the fields array of the form. |
dict(self)Return a dictionary containing the names and valuse of the fields. |
get(self, item)If name is a string ,retruns the field object named 'item'. Otherwise treats the form as a list of fields in the order they were added and and returns form.fields[item]. |
isValid(self)Function designed to be over-ridden in the derived classes to provide custom validation for each individual form. |
names(self)Return a tuple containing the names of the form fields in the order they were added. |
populate(self, form)Sets up the form with the values in the form dictionary. the dictionary should be in the form {name1:value1, name2:value2} as the return from the cgi.FieldStorage() function is. |
setup(self)Constructor to be overridden in derived classes to construct a form object |
themeDict(self)Return a dictionary suitable for use in a lemon.html.template class. |
valid(self)Internal function to make sure no wierd values have been set. Populate should take care of the standard ones. |
values(self, names=None)Return a tuple containing the values of the form fields in the order they were added. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Mon Nov 10 15:08:22 2003 | http://epydoc.sf.net |