On Jan 30, 2008 12:47 AM, Mike Orr <sluggoster@???> wrote:
> On Jan 29, 2008 9:25 PM, A Monkey <monkeylovin@???> wrote:
> > I don't use htmlfill to
> > pre-populate my forms, and I'd recommend against it to anyone that
> > asked. I use my templating language. htmlfill is super-useful for
> > redrawing forms after failed validation, but it always felt like it
> > was more work to use htmlfill to pre-populate than it was worth.
>
> Well, prepopulating it ensures that the same method is used to set the
> initial values as the error values, so that if one is reliable you can
> assume the other will be too. It also avoids having to put
> 'value="${c.fieldname | h}"' all over the template, which lets the
> other placeholders and variables stand out more.
I prefer to set my input fields explicitly; a difference of opinion?
It's true that always using the same method to populate a form will
probably, in isolation, be a more reliable approach. On the other
hand, I was unhappy with the way that things seemed to get overly
complex with I tried to htmlfill larger and more complicated forms. My
recollection is that using htmlfill introduced some coupling that felt
odd at the time. I would try to offer more concrete examples, but I'm
getting sleepy and I'll try not to waste your time.
I should mention that I don't use the validate decorator either, so it
may be that I've made some decisions in how I use formencode with
pylons that will be different than yours.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FormEncode-discuss mailing list
FormEncode-discuss@???
https://lists.sourceforge.net/lists/listinfo/formencode-discuss