[Catalyst] Re: Only call individual fields by number?
tech at swattermatter.com
Wed Dec 17 13:49:29 GMT 2008
Thanks, Kevin. That worked for me.
I think I have figured out what I was doing wrong. If I switch
'FormBuilder' to 'formbuilder' (in lowercase) I can use the following
lines as expected.
<td>[% formbuilder.field.first_name.field %]</td>
<td>[% formbuilder.field.last_name.field %]</td>
<td class="beneath-label">[% formbuilder.field.first_name.label %]</td>
<td class="beneath-label">[% formbuilder.field.last_name.label %]</td>
Gah! Thank you very much, sir.
kevin montuori wrote:
>>>>>> "AK" == Ascii King <tech at swattermatter.com> writes:
> AK> You can only call individual fields by referring to the array index,
> AK> like this:
> AK> [% FormBuilder.field.0.tag %]
> not at all (and relying on a mutable index would be a terrible idea).
> this (cut and pasted) markup works fine:
> [% first_name = formbuilder.field.first_name;
> last_name = formbuilder.field.last_name -%]
> <td>[% first_name.field %]</td>
> <td>[% last_name.field %]</td>
> <td class="beneath-label">[% first_name.label %]</td>
> <td class="beneath-label">[% last_name.label %]</td>
More information about the Catalyst