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