[Zope] Displaying the text from a text area

Stephan Richter SRichter@ixl.com
Sat, 14 Aug 1999 19:39:38 -0500


hello,

I think I can help you, since I had something similar. By default Zope keeps
track of changes, which gives you the python list. You can go around the
problem by using "_v" in fron of your variable (subject of earlier discussion
today). 
Secondly, call your notes variable in the second Form "notes2"
> Form 1:
> 
> <p><b>Notes:</b><br>
> <textarea name="notes" wrap="on" cols="80" rows="10">
> </textarea></p>
> 
> Form 2:
> <p><b>Notes:</b><br>
> <textarea name="notes" wrap="on" cols="80" rows="10">
 ------------>notes2

> <!--#var notes-->
> </textarea></p>

> Undesirable behaviour two--
> When I go to display the text using <!--#var notes--> not only do I get
> both items from the list, but I get untranslated CR/LF pairs. 
I usually use an external method to translate that type of stuff using the
string functions.

import string

def prepare_view(self, REQUEST):
   return string.replace(REQUEST.notes, '\r\n', '\n<br>')

I hope that helps.

stephan
--
Stephan Richter
iXL - Software Designer and Engineer