I think happens because it doesn't "prepare" the form variable
first. So maybe you could do [% SET form = form.prepare %] but
I do it by using the template param and separating the form
templates into separate files. In your form source file, do:
template:
type: TT2
template: root/forms/myform.tt2
variable: vibesearch
In my page template I do [% form.render %]. Then in the
myform.tt2 file I spell out the form layout. Sort of
assumes you want to keep forms laid out in one space
on the page.
Am I missing something Nate?
Mark
On Sun, 5 Nov 2006, frank_coleman wrote:
> From: frank_coleman <frank_coleman@xxxxxxxxx>
> To: fbusers@xxxxxxxxxxxxxxx
> Date: Sun, 5 Nov 2006 22:24:22 -0500 (EST)
> Subject: Re: [FormBuilder] can't render form in TT2
>
>
> Hello Mark!
> I am using Catalyst::Plugin::FormBuilder,
> which automatically assigns the form to a TT2 variable.
>
> The strange thing is that the labels are displayed but not the fields
> themselves.
>
> [% field.label %] produces output
> [% field.field %] does not
>
> Here's the code.
>
> FB YAML fil
> ------------
> name: foo
> method: post
>
> fields:
> one:
> type: text
> required: 1
> two:
> type: text
> required: 0
>
> Catalyst action
> ---------------
>
> sub form : Local Form {
> my ($self, $c) = @_;
>
> $c->stash->{template} = 'test/form.tt2';
> }
>
>
> -FC
>
>
>
>
> _______________________________________________
> No banners. No pop-ups. No kidding.
> Make My Way your home on the Web - http://www.myway.com
>
>
> _______________________________________________
> FBusers mailing list
> FBusers@xxxxxxxxxxxxxxx
> http://www.formbuilder.org/mailman/listinfo/fbusers
>
_______________________________________________
FBusers mailing list
FBusers@xxxxxxxxxxxxxxx
http://www.formbuilder.org/mailman/listinfo/fbusers
|