You could use multiple fieldsets, with one fieldset for each section
of the form. Use a a bit of javascript/css magic to only display the
relevant fieldset, but that way the submit button will submit the
entire form.
If you search back through the list I posted a table form that uses
multiple fieldsets with a header for each section, you could reuse
that and use css to set display:none on all the fieldsets except the
first. Javascript mouseovers on your tabs to change the display
setting for the relevant fieldset.
Ed
On 7/8/06, Wormtongue <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I have a 'profile edit' page, which breaks up the fields into several
> sections. Each section is displayed on a seperate tabber widget tab,
> the entirety of which is wrapped in a form element in the template,
> with a single submit button.
>
> A common problem I had with my drupal rendition of this site, was that
> users would edit all sections, not knowing that the submit button would
> only save the currently visible section. This way, a user can edit all
> the sections of their profile, and then hit submit only once.
>
> You'll see below, I have placed two @validate() decorators one beneath
> the other. That doesn't work, it only validates the first form that
> gets passed. I want to know how to ask @validate() to check the values
> in multiple TableForms. It looks like this:
>
>
> class ProfileForm(widgets.TableForm):
> template = 'testing.templates.profiletable'
>
> class accountfields(widgets.WidgetsList):
> user_name=widgets.TextField(...)
> email_address=widgets.TextField(...)
> accountform = ProfileForm(fields=accountfields(),
> validator=AccountSchema())
>
> class group1fields(widgets.WidgetsList):
> option1=widgets.TextField(...)
> option2=widgets.TextField(...)
> group1form = ProfileForm(fields=group1fields(),
> validator=Group1Schema())
>
> @expose(template='.templates.profile')
> def index(self, *args, **kwargs):
> return {
> 'accountform':accountform,
> 'group1form':group1form,
> }
>
> @expose()
> @validate(form=accountform)
> @validate(form=group1form)
> @error_handler(index)
> def submit(self,*args,**kwargs)
> return {}
>
>
>
> I can't find out how to get that to work for accountform and also for
> group1form.
>
> I also can't find any documentation for the @validate() decorator. If
> anyone knows where that may be found, it would also help a lot.
>
> Thank you!!
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---