[Catalyst] Forms with multiple buttons?

Charlie Garrison garrison at zeta.org.au
Tue Apr 12 21:48:19 GMT 2011


Good morning,

On 12/04/11 at 7:50 AM -0500, John M. Dlugosz 
<wxju46gefd at snkmail.com> wrote:

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

I'd suggest asking this on the HTML::FormFu list.

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

Unless I'm missing something in your requirements, you would 
just use multiple Submit elements in your form config. As long 
as each has a different name then you can check req->params to 
know which button was used to submit the form.


Charlie

-- 
    Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt




More information about the Catalyst mailing list