I have a simple model with two tables, call them "sample" and
"subsample".  Each sample has one or more subsamples (typically two to
ten subsamples).  I need to display a form with the fields for a
sample, and up to ten sets of the subsample fields, and insert the
sample and subsample data into the database when the form is
submitted.

It looks like tw.forms.FormFieldRepeater would handle generating
subsample section of the form. But I' not sure if FormFieldRepeater is
compatible with using sprox. According to the example in tw/forms/
samples.py, the form that uses FormFieldRepeater needs to be
subclassed from ListForm, and must contain a "fields" class...


class SampleForm(ListForm):
    class fields(WidgetsList):
        ...
        subsample = FormFieldRepeater(
            widget = SubsampleFieldset(),
        ...


whereas to use the form with sprox, the form needs to be subclassed
from AddRecordForm, and not contain a fields class...

class SampleForm(AddRecordForm):
    subsample = ???

Can I use FormFieldRepeater and sprox together? If not, any guidance
on generating repeated sets of fields would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to