[Zope] Update a database from a FORM gives missing input variable
neil_b@yahoo.co.uk
neil_b@yahoo.co.uk
Thu, 14 Jun 2001 20:41:44 -0000
I am close to getting a form to update a database, but I seem to have
misunderstood how ZSQLMethod gets variables:
The Form:
<form action="update_table">
<input type="hidden" name="PeopleID" value="9999">
<input type="text" name="Surname" value="">
<INPUT type="submit" value="save" name="submit">
</form>
The action method:
<dtml-call sql_update_tblPeople>
Finally the ZSQLMethod (no arguments set):
UPDATE tblPeople SET tblPeople.Surname = <dtml-sqlvar Surname
type="string">
WHERE tblPeople.PeopleID = <dtml-sqlvar PeopleID type="int">
>From all the documentation and How-tos I have read so far, this
should work, but I get:
missing input variable Surname
Changing the update_table method to:
<dtml-var Surname>
shows that the form delivers the right value.
Can anyone help me to spot my silly error?
TIA
Neil