[Catalyst] help with Catalyst::Plugin::Form::Processor

Michael Higgins linux at evolone.org
Thu Dec 6 18:16:05 GMT 2007


On Thu, 6 Dec 2007 09:10:32 -0800
Bill Moseley <moseley at hank.org> wrote:

> On Thu, Dec 06, 2007 at 07:09:18AM -0800, Michael Higgins wrote:
> 
> Sorry, I missed this question:
> 
> > Will this work without form_widgets.tt or CSS?
> 
> There's no HTML generation code in Form::Processor.  I leave all that
> to the templates.  So, "form_widgets.tt" is an example of a template
> to generate the form and individual fields.  It's a bit ugly of an
> example -- didn't have the time to clean it up nicely for
> distribution.  But, should give you some ideas.
> 
> The reason I leave the html generation to the templates is because the
> markup is often custom to the application.  For example, do you
> include a summary of error messages at the top of your application in
> a message area, or right before the form?  Are error messages
> displayed before the field or after?  Does the application need
> special markup for javascript validation?  Do the form widgets need
> custom class names to work with existing css?
> 
> That kind of markup is always custom, so I just use a template to
> generate it.  And it's abstracted into a single template for all forms
> to use in the application.  Then the individual forms of the
> application can still be custom, but use the application-wide
> template to be consistent.
> 
> 


Thanks a lot for your replies. Yes I did set up and use the example
application. The problem is, I can't make any sense out of the
templates, which seem to do all the work. :(

I can make simple templates, no process, block or wrapper. So, I'm
trying to iterate, somehow, in some rational order, even sorted would
be fine, to expose all the fields in my form.

No wrapper, no Template magic, just the fields I've set up in the same
order each time. With labels, or any other key information, would be
nice...

So, what is the simplest example of returning the form object fields in
a form in TT?

Right now, I'm doing this:


Cheers,

-- 
 |\  /|        |   |          ~ ~  
 | \/ |        |---|          `|` ?
 |    |ichael  |   |iggins    \^ /
 michael.higgins[at]evolone[dot]org



More information about the Catalyst mailing list