[Catalyst] CC::FormBuilder woes

Peter Edwards peter at dragonstaff.com
Fri Apr 27 14:22:12 GMT 2007


If fields is a list reference you need something like

[% form.fields.0.label %]

http://www.template-toolkit.org/docs/aqua/Manual/Variables.html#Hash_Array_R
eferences

Regards, Peter
Dragonstaff Limited  http://www.dragonstaff.com

-----Original Message-----
From: RA Jones [mailto:ra.jones at dpw.clara.co.uk] 
Sent: 27 April 2007 13:47
To: catalyst at lists.rawmode.org
Subject: [Catalyst] CC::FormBuilder woes

Apologies if this not the right forum for this (but if not, where else 
?). According to the FormBuilder docs, the following code in my template 
should (and does) work:

[% FOREACH field IN form.fields %]
<td>[% field.label %]</td>
<td>[% field.field%]</td>
[% END %]

But so should this (and doesn't):
<td>[% form.field.location.label %]</td>
<td>[% form.field.location.field%]</td>





More information about the Catalyst mailing list