[Zope] Newbie Question: Create Table Interface
Roché Compaan
sparroy@adept.co.za
Tue, 17 Aug 1999 08:51:59 +0200
> > Question1:
> > How do you then define a list variable in the dtml document that is only
> > used while busy with the form?
>
> Use <dtml-var "REQUEST.set('name', '[]')"--> and <dtml-var
> "_['name'][index] = value"-->. There is explict support for lists in
> forms but cannot recall it currently.
I'm still lost here. Say for instance if have a list variable
"tablestructure" which contains pairs of "column" and "type". I want to add
to "tablestructure" by dtml along the lines of:
<form action="<!--#var URL1-->/manage_addcolumn" method="POST">
<p>
To add a new column, enter the column name and type and click the
"Add" button.
</p>
<table>
<tr>
<th align="left" valign="top">Column</th>
<td align="left" valign="top"><input type="text" name="column"
size="20"></td>
<th align="left" valign="top">Type</th>
<td align="left" valign="top">
<select name="type"> ...
I want to pass the "column" and it's "type" to the method
"manage_addcolumn".
Q: Do i call <dtml-var "REQUEST.set('name', '[]')"--> in the addcolumn
method or how must i go about. how do i enter "column" and "type" in the
"tablestructure" list.
roché
thanks for the pointers.