"Keith R. Fieldhouse" <[EMAIL PROTECTED]> writes:

> It seems like the correct thing to do is to create a new FormWidget with 
> a custom template.  Within that template though, what is a the right way 
> to get a hand on each of the fields in my form?  The existing forms 
> widgets simple iterate over "fields" and drop them where the next field 
> goes.  If I want to put *this* field *there*, and *that* field *over 
> there* how do I get it?  It seems like I might be able to use the 
> field_for() method of Form but I don't know how to get at it within my 
> form's template?

I'm trying three approaches: one is to hand code the form, then simply replace
values and names and ids there, the other is to use widgets inside this custom
template and the last one is to mix both.

As you can imagine, the first one is the less reusable and the one that is
harder to do.  The second is the least flexible one since I only gain the
placement control.  The third looks like the best approach since it allows me
to use HTML where I need more flexibility and still count on using widgets
where I can. 

> Or, should I just dispense with the Form widget all together and simply 
> create .KID files with my layouts.

Hmmm...  It is another design choice...  You can create .kid files and still
subclass some widget to use its methods.


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

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

Reply via email to