[Catalyst] C::C::FormBuilder question

Juan Camacho jc5826 at gmail.com
Tue Jan 30 17:22:08 GMT 2007

On 1/29/07, Marc Logghe <Marc.Logghe at devgen.com> wrote:
> Actually, the docs give a TT example:
> [% FormBuilder.render %]
> And therefore in TT it is not clear whether it is a variable or a
> package name. Anyways, I tried it with the package name in Mason as well
> (FormBuilder->render, Catalyst::Controller::FormBuilder->render, ....):
> nope. 99% sure in the TT example 'FormBuilder' is a variable, not a
> package name.
> It seems to work only when I do the assignment in the controller:
> $c->stash->{form} = $self->form;
> In Mason template:
> <% $form->render %>
> No magic...

by default C-C-FormBuilder does the equivalent of this:

   $c->stash->{FormBuilder} = CGI::FormBuilder->new(\%attr)

If instead you want it to be $c->stash->{form} set obj_name config variable:

    Not applicable for HTML::Template view. By default, it is
FormBuilder. e.g. $c->stash->{FormBuilder} = $formbuilder.

More information about the Catalyst mailing list