RE: [Zope] Zsql and dtml --- newbie
you don't need dtml-var inside another dtml tag... so for one thing you'd have to change: <dtml-call "SAS.queries.add_key_working(key=<dtml-var sequence-key),value=<dtml-var sequence-item>> to: <dtml-call "SAS.queries.add_key_working(key=key,value=_['sequence-item'])"> But there's another thing...you probably don't want everything in REQUEST.form.items()....this is going to include, at the very least, your submit button's name and value, which you probably don't want in your db. Better off checking explicitly for the input names you used in the html form. Jim -----Original Message----- From: Tuttle, Gene [mailto:cetuttle@rottlundhomes.com] Sent: Wednesday, September 01, 2004 2:27 PM To: zope@zope.org Subject: [Zope] Zsql and dtml --- newbie I am have trouble understanding how this should work. I have a form that has dynamic fields on it. the number and name are variable. I would like to store these in a working table in a database. The table has two fields and I have a ZSQL method to update the database : select add_key_working('<dtml-var expr="_.SecurityGetUser().getUserName()">', <dtml-sqlvar key type="string">, <dtml-sqlvar value type="string">); I try this and it does not work <dtml-if submit> <!-- Insert new values option values from the working table --> <dtml-in "REQUEST.form.items()" sort> <dtml-call "SAS.queries.add_key_working(key=<dtml-var sequence-key),value=<dtml-var sequence-item>> </dtml-in> </dtml-if> it is not valid DTML How do I get the values into the query. Thanks Gene Tuttle _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Jim Abramson