<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Peter Edwards wrote:
<blockquote cite="mid:01d701c788cf$12a2dea0$6401a8c0@DRAGON1"
 type="cite">
  <pre wrap="">If fields is a list reference you need something like

[% form.fields.0.label %]

<a class="moz-txt-link-freetext" href="http://www.template-toolkit.org/docs/aqua/Manual/Variables.html#Hash_Array_R">http://www.template-toolkit.org/docs/aqua/Manual/Variables.html#Hash_Array_R</a>
eferences

  </pre>
</blockquote>
Oh dear, that works! But it's not what I want as I can't easily force
specific fields where I want them spatially if I have to loop over an
array. I want some table rows to contain 3 fields, and others to
contain one or two. I can do this if manipulating a hash(ref), but with
an array(ref) it is very messy.<br>
<br>
The <a class="moz-txt-link-freetext" href="CGI::FormBuilder::Template::TT2">CGI::FormBuilder::Template::TT2</a> documentation distinctly gives the
impression I can retrieve fields from the form.field hash:<br>
<br>
You can access individual fields via the <code>field</code> variable.
<pre>    For a field named...  The field data is in...
    --------------------  -----------------------
    job                   [% form.field.job   %]
    size                  [% form.field.size  %]
    email                 [% form.field.email %]

</pre>
Then use eg form.field.location.label in the template. I have done this
previously using <a class="moz-txt-link-freetext" href="CGI::FormBuilder">CGI::FormBuilder</a> in a stand-alone environment, so I
must be missing something obvious here.<br>
--<br>
Richard Jones<br>
Leeds, UK<br>



<DIV align=left><FONT face=Courier color=#000000 size=2>**********************************************************************</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>This&nbsp;message&nbsp;&nbsp;may&nbsp;&nbsp;contain&nbsp;&nbsp;confidential&nbsp;&nbsp;and&nbsp;&nbsp;privileged&nbsp;information.</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>If&nbsp;you&nbsp;are&nbsp;not&nbsp;&nbsp;the&nbsp;intended&nbsp;&nbsp;recipient&nbsp;please&nbsp;&nbsp;accept&nbsp;our&nbsp;&nbsp;apologies.</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>Please&nbsp;do&nbsp;not&nbsp;disclose,&nbsp;copy&nbsp;or&nbsp;distribute&nbsp;&nbsp;information&nbsp;in&nbsp;this&nbsp;e-mail</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>or&nbsp;take&nbsp;any&nbsp;&nbsp;action&nbsp;in&nbsp;reliance&nbsp;on&nbsp;its&nbsp;&nbsp;contents:&nbsp;to&nbsp;do&nbsp;so&nbsp;is&nbsp;strictly</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>prohibited&nbsp;and&nbsp;may&nbsp;be&nbsp;unlawful.&nbsp;Please&nbsp;inform&nbsp;us&nbsp;that&nbsp;this&nbsp;message&nbsp;has</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>gone&nbsp;&nbsp;astray&nbsp;&nbsp;before&nbsp;&nbsp;deleting&nbsp;it.&nbsp;&nbsp;Thank&nbsp;&nbsp;you&nbsp;for&nbsp;&nbsp;your&nbsp;co-operation.</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>&nbsp;</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>NHSmail&nbsp;is&nbsp;used&nbsp;daily&nbsp;by&nbsp;over&nbsp;100,000&nbsp;staff&nbsp;in&nbsp;the&nbsp;NHS.&nbsp;Over&nbsp;a&nbsp;million</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>messages&nbsp;&nbsp;are&nbsp;sent&nbsp;every&nbsp;day&nbsp;by&nbsp;the&nbsp;system.&nbsp;&nbsp;To&nbsp;find&nbsp;&nbsp;out&nbsp;why&nbsp;more&nbsp;and</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>more&nbsp;NHS&nbsp;personnel&nbsp;are&nbsp;&nbsp;switching&nbsp;to&nbsp;&nbsp;this&nbsp;NHS&nbsp;&nbsp;Connecting&nbsp;&nbsp;for&nbsp;Health</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>system&nbsp;please&nbsp;visit&nbsp;www.connectingforhealth.nhs.uk/nhsmail</FONT></DIV>
<DIV align=left><FONT face=Courier color=#000000 size=2>**********************************************************************</FONT></DIV></body></html>