[Zope] DTML form variable name cocatenation

hpinson@indepthl.com hpinson@indepthl.com
Wed, 25 Jun 2003 13:26:23 -0600


Would anyone have a suggestion on how to do this in DTML?  

I have a dtml-in statment that returns a variable number of values 
from a database field "standard_text" from a MySQL database.  What I 
need to do is replace the <input name="i" ..> name value with a 
unique variable name for each iteration.  

<dtml-in SQL_getMath>
  <input name="i" type="checkbox" value="1" ><br>
</dtml-in>

Optimally this would output something like:

<input name="i1" type="checkbox" value="1" ><br>
<input name="i2" type="checkbox" value="1" ><br>
<input name="i3" type="checkbox" value="1" ><br>

Where the letter "i" is cocatenated to a incremeting value to 
construct the form checkboxes name value.

My guess is that the solution would have something to do with 
cocatenation and looping. Any suggestions?

Harlow Pinson
Indepth Learning
Email: hpinson@indepthl.com 
Web: http://www.indepthl.com
Voice: 505-994-2135
FAX: 208-475-7678