[Zope] Form variables with same name as folder names

Burwell, Becky <burwell@parc.xerox.com> burwell@parc.xerox.com
Mon, 13 Nov 2000 10:01:32 PST


Hi. I am new to using Zope and just got stuck on the following problem. I am trying to use forms with an SQL database.

I have a form with checkboxes and I use variables like FOO to capture the value. For example:
    <input type="checkbox" name="FOO" value="1">

The form has a post with the action to call a DTML document. In my DTML document I call
a Z SQL Method called InsertMethod with REQUEST as the argument, for example  InsertMethod(REQUEST).

My Z SQL Method InsertMethod has arguments including
	FOO=""

And then in the body of the Z SQL method I have:

<dtml-if FOO>
   {code to insert into a database table}

----------------
This working UNTIL I created a Folder named FOO. Then the value of FOO in the Z SQL method seemed to be the FOO folder and not FOO from REQUEST.  My workaround was to call the variable FOOCHECKBOX.

Two questions:

1) the ZSQL manual, http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.4.4.html, says that the first lookup should be variables in HTTP_REQUEST. So why is FOO referring to my folder FOO?

2) is there some way I could have referred to the variable FOO in my Z SQL method without resorting to renaming the variable in my form?

Thanks!

*becky*