Forms

These are widgets which are designed to hold FormField instances. They automatically create a SubmitButton if none is provided.

Form

The base class of all forms. This widget does not provide a useful template by itself and should be overriden to provide custom layout.

class tw.forms.fields.Form(*args, **kw)

A base class for all forms.

Use this class as a base for your custom form. You should override it’s template because it’s a dummy one which does not display errors, help text or anything besides it’s fields.

The form will take care of setting its enctype if it contains any FileField

TableForm

This form renders its fields in a two-column table.

class tw.forms.fields.TableForm(*args, **kw)
A form that renders it’s fields in a table

ListForm

This form renders its fields in an unordered list

class tw.forms.fields.ListForm(*args, **kw)
A form that renders it’s fields as an unordered list

An example

Here’s ListForm with some fields and a repeated FieldSet.

Table Of Contents

Previous topic

Basic fields

Next topic

Fieldsets

This Page

Quick search