[Zope-DB] Trying to query against pre-populated form

Laura McCord Laura.McCord at doucet-austin.com
Wed Apr 28 13:49:24 EDT 2004


I have this dilemna and I am hoping someone could give me an idea on how
to do this.

I have a form called view_users_html that displays all users in the
users table and each record of users contains an edit link. 

userid name    email       state 
1      jane jane at blah.com  texas       [edit]
2      jim  jim at blah.com   california  [edit]
3      jill jill at blah.com  florida     [edit]


Right now the edit link directs to a user_EditForm passing the userid in
the url:
<td><span><a tal:attributes="href python: 'user_EditForm?userid=' +
str(userid)">[edit]</a></span></td>

I can prepopulate the userid field but I don't know how to retrieve the
other user information and prepopulate the fields and also incorporate
the sql method that will update the user information.

So for example if I have the following pre-populated fields in the user
edit form, I want to be able to give jane a new name and hit a submit
button that will update the database.

userid: 1
name:  jane
email: jane at blah.com
state: texas


Any ideas will be much appreciated.

Thank,
 Laura
    



More information about the Zope-DB mailing list