[Zope] control of layout in ZPT

pradeep behera pradeepdeveloper@yahoo.com
Fri, 13 Jun 2003 06:24:04 -0700 (PDT)


--0-1011655612-1055510644=:73458
Content-Type: text/plain; charset=us-ascii


Hi,

I want to use formulator for designing my forms. However it does not allow more than one field to be presented in the same row (a requirement for my form). 

I am using the example from this URL 
http://www.zope.org/Members/beno/HowTo/HowTo/Formulator_With_ZPT

The difficulty I am facing is that the sample code uses:

 <tr tal:define="yourname request/YourName|nothing">
   <th align="left">
    <font size=5><font face="verdana"><b>
     Your Name:
    </b></font></font>
   </th>
   <td><input type="text" name="YourName"
       tal:replace="structure python:form.YourName.render(yourname)" />
   </td>
</tr>

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

Can you please help me resolve this.

Thanks
Pradeep




---------------------------------
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
--0-1011655612-1055510644=:73458
Content-Type: text/html; charset=us-ascii

<DIV>
<DIV>
<P>Hi,</P>
<P>I want to use formulator for designing my forms. However it does not allow more than one field to be presented in the same row (a requirement for my form). </P>
<P>I am using the example from this URL <BR><A href="http://www.zope.org/Members/beno/HowTo/HowTo/Formulator_With_ZPT" target=_blank><FONT color=#0000ff>http://www.zope.org/Members/beno/HowTo/HowTo/Formulator_With_ZPT</FONT></A></P>
<P>The difficulty I am facing is that the sample code uses:</P>
<P>&nbsp;&lt;tr tal:define="yourname request/YourName|nothing"&gt;<BR>&nbsp;&nbsp; &lt;th align="left"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;font size=5&gt;&lt;font face="verdana"&gt;&lt;b&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; Your Name:<BR>&nbsp;&nbsp;&nbsp; &lt;/b&gt;&lt;/font&gt;&lt;/font&gt;<BR>&nbsp;&nbsp; &lt;/th&gt;<BR>&nbsp;&nbsp; &lt;td&gt;&lt;input type="text" name="YourName"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:replace="structure python:form.YourName.render(yourname)" /&gt;<BR>&nbsp;&nbsp; &lt;/td&gt;<BR>&lt;/tr&gt;</P>
<P>for each row. To&nbsp; make 2 fields appear in the same row, i am trying to do this:</P>
<P><BR>&nbsp;&lt;tr &gt;<BR>&nbsp;&nbsp; &lt;th align="left"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;font size=5&gt;&lt;font face="verdana"&gt;&lt;b&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; Your Name:<BR>&nbsp;&nbsp;&nbsp; &lt;/b&gt;&lt;/font&gt;&lt;/font&gt;<BR>&nbsp;&nbsp; &lt;/th&gt;<BR>&nbsp;&nbsp; &lt;td tal:define="yourname request/YourName|nothing"&gt;&lt;input type="text" name="YourName"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:replace="structure python:form.YourName.render(yourname)" /&gt;<BR>&nbsp;&nbsp; &lt;/td&gt;</P>
<P>&lt;td tal:define="youremail request/YourEmail|nothing"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;font size=5&gt;&lt;font face="verdana"&gt;&lt;b&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp; Your Email Address:<BR>&nbsp;&nbsp;&nbsp; &lt;/b&gt;&lt;/font&gt;&lt;/font&gt;<BR>&nbsp;&nbsp; &lt;/td&gt;</P>
<P>&nbsp;&nbsp; &lt;td&gt;&lt;input type="text" name="YourEmail"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:replace="structure python:form.YourEmail.render(youremail)"&gt;<BR>&nbsp;&nbsp; &lt;/td&gt;<BR>&nbsp;&lt;/tr&gt;</P>
<P>However I am getting errors <BR>Error Type NameError<BR>Error Value name 'youremail' is not defined</P>
<P>Can you please help me resolve this.</P>
<P>Thanks<BR>Pradeep</P></DIV></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Free <a href="http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.com">online calendar</a> with sync to Outlook(TM).
--0-1011655612-1055510644=:73458--