Alberto:

I was following good until I got to the last sentence.  Could you point me
to an example of what the kid template should look like?  I'm really
confused about how this will present in the HTML and where the submit button
is going to end up.  I think I could figure it all out if I saw the kid file
that the tabs will appear in.

           -Jim

_____
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Alberto Valverde
Sent: Thursday, January 18, 2007 11:42 AM
To: [email protected]
Subject: [TurboGears] Re: Mutliple validators


On Jan 18, 2007, at 6:22 PM, Jim Steil wrote:

To start with, I remember trying to use the FieldSet for this earlier but
didn't know how to validate it.  What would the syntax look like if trying
to validate multiple FieldSets?  And yes, this is all validation going into
1 method.

The same as for a form (they're both FormFieldsContainers):

class FS1Fields(WidgetsList): ....
class FS2Fields(WidgetsList): ....

class FormFields(WidgetsList):
           fs1 = FieldSet(fields=FS1Fields())
           fs2 = FieldSet(fields=FS2Fields())

class form = Form(fields=FormFields())

That form would validate both fieldsets (which in turn, will validate their
fields) and present the value in a dict with two nested dicts, one for each
fieldset.

You could place each fieldset in a tab by passing a field_class parameter to
each fieldset with the appropiate css class (tabbertab IIRC) and listing the
tabber's JSLink at the forms javascript attribute.

HTH,

Alberto



--~--~---------~--~----~------------~-------~--~----~
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