On 2/22/07, Ferruccio Zamuner <[EMAIL PROTECTED]> wrote:
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?
Your Controller should inherit from C:C:FormBuilder. Please provide
more information as to why you want to modify the constructor method
-- new. I'm assuming that's what you meant. Unless you are actually
extending the functionality of C:C:FormBuilder I wouldn't recommend
it.
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 );
Thank you. But I beat you to it :) I already have that change checked
into the trunk.
Juan
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/