[Zope] Trivial problem with sending form variables to an update Zsql met hod..
Thomas B. Passin
tpassin@mitretek.org
Tue, 15 Jan 2002 14:04:09 -0500
[Peter Borocz]
> Group, I've got a vexingly simple problem that'll probably push up another
> level to zope enlightenment. In particular, how to get the variables from
a
> regular HTML form passed through to a zsql method containing an update
> statement>
>
> So, a (paraphrased) simple dtml-document page like this:
>
> <dtml-in zsqlQueryARecord>
> <form action="zsql_UpdateRecord">
> <input name="keyField" type="hidden" value="<dtml-var keyField>">
> <textarea name="contentsField">
> <dtml-var contentsField>
> </textarea>
> <input type="submit">
> </form>
> <dtml-in>
>
Do I understand this right - your web page has a series of forms, one per
row from zsqlQueryARecord? And the user would be sending a text comment
against any one of these rows at a time?
As invoked, zsql_UpdateRecord probably will not be getting any namespace
passed to it, and it will have none of its own. So it can't find the form
data.
Normally, I would use a dtml document as the target of the form, and that
document would invoke <dtml-call zsql_UpdateRecord>. This way the
parameters get sent to the method by the dtml document.
Cheers,
Tom P