[Zope] Thanks! New stuckage: newlines...

Gustin Kiffney gustin_kiffney@fd.org
Thu, 14 Oct 1999 13:31:54 -0400


To those who showed me how to access items in a list (put the identifier
in quotes, e.g., don't say parms[0], say "parms[0]")  - thanks!  I think a
'quoting-howto' would be a wonderful thing.  Right now I paw through the egroups
zope index hoping I'll find an incantation that will show me how to call a
particular method (like, why doesn't <dtml-var "_.int(_.time.time())"> work when
the time module is right there big as life?)  

Now I can't get past newlines.  I have an input form that uses a couple of
textareas where newlines can be inserted.  I'm sticking all those form inputs -
mostly textboxes, but some textareas - into an mailhost method that calls a SQL
method that inserts them into a database.  These textarea fields are supposed to
go into a 'memo' field in the database that can accept newlines. As long as I
put no newlines in the form, the SQL insert goes fine.   But if newlines exist,
I get parse errors from the SQL interpreter.  I can't see exactly what's going
to the SQL interpreter because the SQL is not returned.  But it's got to be a
newlines problem - if there are no newlines in the textarea, there are no parse
problems.  I tried (in the SQL method) changing the <dtml-sqlvar textitem
type=string> to "<dtml-var textitem newlines_to_br>" (adding quotes around the
dtml-var to help stringify it) but this made no difference.  

Anybody figured this out?