Posted on 2008-11-25 00:12:06-08 by millerx
Trouble with Docs for FormBuilder::TT2
Hi,

I'm working from these docs, and I have the latest version of FormBuilder and Catalyst:

http://search.cpan.org/~nwiger/CGI-FormBuilder-3.0501/lib/CGI/FormBuilder/Template/TT2.pm

I have a form that I need to specify each input field separately -- like this:

[% FOREACH f IN form.fields -%]
[% f.tag %]
[% END %]

This outputs all my fields with <input...> fields. However, the docs say that the
correct syntax is [% f.field %], which doesn't work.

I've also noticed that [% form.jshead %] doesn't work, but [% form.script %] does.

Finally, if I have a input field named 'email', the does say that [% form.field.email.field %]
should output the <input...> tag and [% form.field.email.tag %] doesn't work either.
I've tried a number of different combinations and the only this I could get to work is [%
form.fields.0.tag %], but this is pretty inconvenient -- I have one form with 20 fields, so it
would be much more maintainable if I could use the actually field name.

Is there another set of docs that I should be working from?

Thanks,
Bill
Direct Responses: 9415 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.