Hi
so, I have this table:
db.define_table('p4users',
SQLField('p4_user'),format='%(p4_user)s')
which gives me a nice dropdown :)
then I have this one, where I want to update the Status field.
db.define_table('p4users_all',
SQLField('Name', db.auth_user, default=auth.user_id),
# SQLField('User',db.p4users),
SQLField('User_id',requires=IS_IN_DB(db,db.p4users.id,'%
(p4_user)s')),
SQLField('Status',db.p4Status),
SQLField('License',db.license))
in the controller, I have something like this (i know a little messy,
but I am in a rush ... I have been grasping at this point ;) )
def display_form():
# record = db.p4users_all(request.args(0))
row = db.p4users_all[request.args(0)]
form = SQLFORM(db.p4users_all, row, deletable=True)
form.vars.id = request.vars.id
if form.accepts(request.vars, session):
response.flash = 'form accepted'
elif form.errors:
response.flash = 'form has errors'
return dict(form=form)
Any help, would REALLY be appreciated! :)
Thahnnks,
Mart :)
How do I make so it doesn't create a new record every time I want to
update a user's status?