No, there isn't specific support. What I would do is this:
- don't use validators for formfields, instead use Schemas
- try combining schemas - I'm not sure if that's inherently supported
in formencode, but it shouldn't be hard to write it anyway (I've done
that once before, bot don't have the code handy)
I'm not sure if there is a way to declare the formfields automatically
as HiddenInputfields, but you might consider writing a helper-function
for that as well.
All in all, it would be a worthy extension to TW-forms.
Diez
> I'm working on a project where a multipage form would be much easier
> than a long form. Each page would have separate validation, but, the
> data shouldn't be submitted until the end.
TW doesn't have anything specifc. You could use something like the
tabber in tw.yui, and put the field on different tabs.
If you have any suggestions for how the widget library could further
help with this, let us know.
Paul
I would suggest a different approach which is more flexible and doesn't make
rather dumb leaf-widgets need to know anything about them being part of
something larger.
Write a multi-step-form that takes a list of "normal" forms.
On display, there is a parameter that determines which of the child-widgets
is to be rendered. This form gets rendered normal, all preceding ones get
their values rendered into hidden formfields. The question is if this can be
done by "injecting" a child-widget into the respective forms - then you can
use whatever form you want.
If not, the sub-forms need to be able to suppress their form-tag-rendering.
Which is a slight duplication of existing code.
But with this approach, you can use whatever leaf-widgets you like, and don't
need to make them aware of their containing environment.
Diez