[Catalyst] Forms with multiple buttons?

John M. Dlugosz wxju46gefd at snkmail.com
Tue Apr 12 12:50:02 GMT 2011


I've chosen Catalyst::Controller::HTML::FormFu to use with my app.

How would I have a form with multiple buttons?  For example "revert", "preview", and 
"commit"?   The latter two want the same textarea to be sent, so are part of the same form.

Even having a different Form for "revert", since it doesn't use the same data and does a 
totally different action, I have no idea how to accomplish based on the documentation 
examples.  Even if I didn't rely on the {form} stash variable but made more than one 
variable directly, how does it know which form was triggered?  The basic concept of the 
module is that forms are rendered and processed at the same URL.  That bothered me at 
first, but I can see how it is very good for successive attempts to submit a form with errors.

--John




More information about the Catalyst mailing list