[ZPT] control of layout in ZPT
Geir Bækholt
lists at elvix.com
Fri Jun 13 23:00:11 EDT 2003
On Fri, 13 Jun 2003 05:54:04 -0700 (PDT) GMT (..14:54 where i live(GMT+2) )
pradeep behera asked the ZPT mailinglist about the following:
> for each row. To make 2 fields appear in the same row, i am trying to do this:
> <tr >
> <th align="left">
> <font size=5><font face="verdana"><b>
> Your Name:
> </b></font></font>
> </th>
> <td tal:define="yourname request/YourName|nothing"><input type="text" name="YourName"
> tal:replace="structure python:form.YourName.render(yourname)" />
> </td>
> <td tal:define="youremail request/YourEmail|nothing">
> <font size=5><font face="verdana"><b>
> Your Email Address:
> </b></font></font>
> </td>
> <td><input type="text" name="YourEmail"
> tal:replace="structure python:form.YourEmail.render(youremail)">
> </td>
> </tr>
> However I am getting errors
> Error Type NameError
> Error Value name 'youremail' is not defined
A define only exists within the element upon which it is declared.
define both YourName and YourEmail in the tr instead, like this:
<tr tal:define="yourname request/YourName|nothing" ; youremail
request/YourEmail|nothing">
and... on a totally unrelated side-note:
please stop using those <font>-elements. They only do you evil..
;)
--
Geir Bækholt
More information about the ZPT
mailing list