Fieldsets

These widget containers are designed to hold fields to edit a related item inline in their parent’s form. When a form containing a fieldset is validated, all the fields in the fieldset will appear in a nested dictionary inside the forms dict (Fill and submit this sample form to undersand it better)

To create fieldsets for purely layout purposes it is best to create a custom template and put the fieldset markup there.

FieldSet

This is the base class of all fieldset widgets. It has a very basic template which should be overriden.

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

Base class for a fieldset.

Use this class for your custom fieldset. 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.

TableFieldSet

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

ListFieldSet

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