[Zope] (no subject)

Gitte Wange gitte@babytux.dk
Mon, 30 Apr 2001 19:16:30 +0200


>
> On 03 Apr 2001 10:15:18 -0600, Casey Duncan wrote:
> > Gitte Wange wrote:
> > > Well that helped a little.
> > > I set the Form ACTION-tag to sqlDeleteClips (which is my sql method)
> > > and the checkbox name to "ids:list"
> > > When I hit the submit button, you see a Zope page where there is a
> > > input box to enter the ids in .. but I just want it do delete the ones
> > > that are selected ???
> >
> > You can't point the action of the form directly to the SQL method
> > because it is not a web template. I would suggest having the form call
> > itself and add some dtml logic at the top to determine that the user
> > deleted something. Have it then fire off the SQL method before drawing
> > the checkboxes. Something like so:
> >
> > <dtml-if delete>
> >       <dtml-call name="sqlDeleteClips">
> > </dtml-if>
> >
> > <form action="&dtml-URL;">
> > <dtml-in sqlSelectClips>
> >     <input type="checkbox" name="ids:list" value="&dtml-id;" />
> >     <dtml-var name="title"><br />
> > </dtml-in>
> > <input type="submit" name="delete" value="Delete" />
> > </form>
> >
> > Substitute your field names for "id" and "title" above.
> > --
> >
> > | Casey Duncan
> > | Kaivo, Inc.
> > | cduncan@kaivo.com
> >
> > `------------------>

Now I get the following error after hitting the submit button:
Error Type: error
            Error Value: You have an error in your SQL syntax near
'['2', '2', '2', '2', '2', '2', '2', '2', '2']' at line 1

Yes I am stupid but I don't understand what the problem is.
The argument for my sql method is: ids:list

Regards, Gitte Wange