[Catalyst] Any recommendations for multiple forms in catalyst (have been using HTML::FormFu)?

kakimoto at tpg.com.au kakimoto at tpg.com.au
Sun Jul 6 08:28:18 BST 2008


Hi, carl,

 thanks for the help!! 
the doco you passed to me on was really good.. Thanks


Nevertheless, I could only find
Catalyst::Controller::FormBuilder::MultiForm.
 You mentioned there's  HTML::FormFu::MultiForm. I have seen
"Catalyst::Controller::HTML::FormFu::Action::MultiForm" but can't seem
to read up on it cause there's no link to it in
http://search.cpan.org/~cfranks/Catalyst-Controller-HTML-FormFu-0.03000/.


Yes, I know we could use perhaps another module to handle forms with
multiple steps but I think HTML::FormFu is cool and would love to build
my application with it.   Would be great if you could shed some light here. 


thank you.





Quoting Carl 
Franks <fireartist at gmail.com>:

> 2008/7/4 Tomas Doran <bobtfish at bobtfish.net>:
> >
> > On 3 Jul 2008, at 09:05, Carl Franks wrote:
> >>
> >> I'm guessing that in step 3, your $c->stash->{form} is the one
> created
> >> by the FormConfig action - in which case it's the same form used
> for
> >> step 1.
> >> It won't validate the submitted parameters, because it doesn't
> know
> >> about any of the fields you generated in step 2.
> >> What you need to do is again generate the same form as step 2, and
> use
> >> that to validate the submitted parameters.
> >>
> >
> > I'd disagree. At each step, you want to validate where you got so
> far, and
> > if that validation goes well, move on - otherwise, move back...
> 
> I think there's been either a lacking in my explanation, or a
> lacking
> in your interpretation - if you follow my posted code, it does
> exactly
> what you describe.
> 
> Display form 1
>  -> if valid goto form 2
>  -> if not valid redisplay form 1
> Display form 2
>  -> if valid, use the data
>  -> if not valid, redisplay form 2
> 
> This is exactly what HTML::FormFu::MultiForm does, but makes it more
> simple, as you can do it all within a single Catalyst action - it
> also
> encrypts previous form's data within a hidden field, so you don't
> need
> to revalidate earlier data.











More information about the Catalyst mailing list