Thank to all for help. I have found an idea in another thread and this is my solution:
def editcv(): pid = db(db.person.name == 'Smith').select().first().id query = db.cv.id == pid db.cv.person.writable = False *db.cv.person.default = pid* return dict(grid=SQLFORM.grid(query,user_signature=False)) 2011/12/7 Anthony <[email protected]> > You probably have to define a function to add records to 'cv' and modify >> the SQLFORM-grid to let the 'add' button refer to that function where the >> 'person' field will be writable. >> >> I don't know hot to change the link in the 'add' button in the grid. >> Maybe someone else can help. >> > > You can edit the href of the 'add' button via: > > grid.element('.web2py_search_actions a')['_href'] = URL(...) > > Anthony > -- Mit freundlichen Grüßen / With kind regards Martin Weissenböck Gregor-Mendel-Str. 37, 1190 Wien Austria / European Union Tel +43 1 31400 00 Fax +43 1 31400 700

