try: form = SQLFORM(db.pumpkits, records[0].id, deletable=True)
where records[0].id is the id 2011/2/23 wdtatenh <[email protected]> > Thanks in advance - > > I've created the sqlite table. The records that I've added thus far > show up in the view. I can add new records without difficulty using > SQLFORM. > > However, when I convert the controller to an update/delete form and > hard wire the form to present a specific record in the view to be > updated or deleted - the record details appear and so does the option > to delete - but neither the request to update or delete takes. > > The update form in the controller appears as: > > def addkit(): > records= db(db.pumpkits.id=='3').select() > form = SQLFORM(db.pumpkits, records[0], deletable=True) > if form.accepts(request.vars, session): > response.flash = 'form accepted' > elif form.errors: > response.flash = 'form has errors' > > records = SQLTABLE(db().select(db.pumpkits.ALL)) > return dict(form=form, records=records) > > The view is simply: > {{extend 'layout.html'}} > > <h1>Manage Kits</h1> > <div style="padding:10px;"> > {{=form}} > </div> > {{ =records } > -- Pablo Martín Mulone ([email protected]) http://www.tecnodoc.com.ar/ Paraná, Entre Ríos, Argentina (CP 3100). My blog: http://martin.tecnodoc.com.ar Expert4Solution Profile: http://www.experts4solutions.com/e4s/default/expert/6

