[Zope] Use of the :records variable type and ZSQL methods
Calvin Parker
calvin@mediumlook.com
Sun, 24 Sep 2000 13:07:38 -0700
I am trying to take in a form that has multiple records like this:
<FORM ACTION=add_records>
Field1<INPUT TYPE="text" NAME="testlist.Field1:records:ignore_empty"
SIZE="30">
Field2<INPUT TYPE="text" NAME="testlist.Field2:records:ignore_empty"
SIZE="30"><br>
Field1<INPUT TYPE="text" NAME="testlist.Field1:records:ignore_empty"
SIZE="30">
Field2<INPUT TYPE="text" NAME="testlist.Field2:records:ignore_empty"
SIZE="30"><br>
Field1<INPUT TYPE="text" NAME="testlist.Field1:records:ignore_empty"
SIZE="30">
Field2<INPUT TYPE="text" NAME="testlist.Field2:records:ignore_empty"
SIZE="30"><br>
<INPUT TYPE="submit" VALUE="go"
</FORM>
I want to loop through the records on the add_records page. It works fine
if I do this and just display them:
<table>
<dtml-in testlist>
<tr>
<td><dtml-var Field1 missing></td><td><dtml-var Field2 missing></td>
</tr>
</dtml-in>
</table>
I get the following error if I try looping it through a ZSQL Method:
Error Type: Bad Request
Error Value: ['Field1', 'Field2']
Here is the code I used and sqlTest is the ZSQL Method that just inserts the
two fields into a test DB:
<dtml-in testlist>
<dtml-call sqlTest>
</dtml-in>
What am I doing wrong?
Calvin