[Catalyst] C::C::FormBuilder + TT2

Ferruccio Zamuner nonsolosoft at diff.org
Thu Feb 22 16:44:08 GMT 2007


Ferruccio Zamuner wrote:
> Hi
>
> I'm using TTSite and it renders forms if I call from TT2 [% 
> form.render %], it doesn't when I try to construct custom form template.
> What am I missing?
>
[% formbuilder.field.myfield.field %] is ok!

> Another question about Catalyst and FormBuilder:
> On latest FormBuilder version (3.05), it is possible:
>
> $form->new(template => {type => 'div'});
>
> Where I can add such argument for template attribute to 
> C::C::FormBuilder?
According what I've read I need to create subclass C::C::FormBuilder to 
modify new.
Is it right?


I've find a fix to avoid a warning in C::C::FormBuilder::Action.pm line 34:
---
    if (my $source = $self->_source($controller, $c) ) {
        $attr{source} = $source;
    }

-    s/^\.*/./;    # XX workaround for CGI::FormBuilder::Source::File bug
+  s/^\.*/./ if $_;
    return CGI::FormBuilder->new( \%attr );
---


Bye,                  \fer



More information about the Catalyst mailing list