It depends on whether you want to use ajax or not. Let's say no-ajax:
assuming db.define_table('thing',Field('name'))
def index():
form = SQLFORM(db.thing,request.args(0,cast=int))
db.thing.id.represent=lambda id,row:A('edit',URL(args=id))
items = db(db.thing).select()
return dict(form=form,items=items)
of course you can use grid as well
@auth.requires_login()
def index():
return dict(grid=SQLFORM.grid(db.thing))
You can do it with Ajax but how really depends on details.
Massimo
On Saturday, 28 July 2012 09:57:56 UTC-5, John Zumsteg wrote:
>
> I would like to create a view that has a table and a form that work
> together. The user could click on a link in a table row, and the form
> fields would populate with the values for the record represented by that
> row. The user could then edit values in the form and save them. It seems
> that this would be a reasonably common pattern, but I cannot find any
> examples of how to do it. Can someone point me to an example of this
> table/form pattern, or give me some general idea of how to do it? I can
> figure out the details, but so far, I have not been able to come up with a
> workable approach.
>
> Thanks,
> John
>
--