Am 09.03.2010 um 16:00 schrieb Patricio Valarezo Lozano:
Diez B. Roggisch wrote:
I'm trying to build a form like an "order form" with fields for the
client name, etc, and rows that includes labels, textfields,
checkbox,
etc, this rows are dependant of the post sent by the controller in
the
previous step, is there some sample of something similar on the
web? I
could do this using genshi and pure HTML but i want to take
advantage of
formencode validators, and use the tg stack as supposed to be
used ;-).
This is still a bit to unspecific for me to really answer this. I
can only guess that you want to have a "static" part (acceptance of
GTC, payment information and some such), plus the list of items in
the cart.
There are various ways to tackle this, but I would create a
CartItemWidget, inheriting FormField (otherwise forms won't render
it), and that widget renders all the form elements you need.
You *can* wrap it into a formfield-repeater, then it should only
need to render itself. But my personal experience with these is
limited & mixed.
Diez
mmm... I think this may solve the problem, I have done CartRow from
FormField, but how can i append the widgets to the Cart(FormTable)
widget?
Can you show some code, and pseudo-code what you want to achieve?
Diez
--
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.