[Catalyst] RFC - Catalyst::Controller::FormBuilder::MultiForm
Danny Warren
danny at io.com
Mon Feb 26 04:37:11 GMT 2007
Hey all!
This is the module that I wrote (with Juan Camacho's help) in response
to my last thread about multiple forms with FormBuilder...
http://www.gossamer-threads.com/lists/catalyst/users/12499#12499
With this, you can refer to one or more form objects in your template by
form name. Since you can now refer to form objects by name, you can put
as many of them as you want in a single template.
If you were using Template::Toolkit, you would access a form named
"my_foo_form" like this:
[% forms.my_foo_form.FormBuilder.render %]
Then, if you also had a "some_other_form" in your action, you would
access it like this in the same template:
[% forms.some_other_form.FormBuilder.render %]
In addition, regular FormBuilder functionality still works as expected,
so if you had only one form in your action you could still do:
[% FormBuilder.render %]
For examples and more information, see the perldoc on CPAN:
http://search.cpan.org/~dwarren/Catalyst-Controller-FormBuilder-MultiForm-0.01/
Let me know what you all think, and how it works for you! Thanks again
to Juan for all his help and answering my endless questions.
Danny
More information about the Catalyst
mailing list