Hii! How could I pre populate a crud.update (or equivalent with SQLFORM), I
mean, I have 3 list:string multiple fields (they take the value from another
table), like this

db.define_table('project',
                Field('name','string'),
                Field('comment','text'),format='%(name)s')
db.define_table(
    auth.settings.table_user_name,
    Field('first_name', length=128, default=''),
    Field('last_name', length=128, default=''),
    Field('username', length=128, default='', unique=True),
    Field('email','string'),
    Field('prefered_project',db.project,requires=IS_IN_DB(db,db.project.id
,"%(name)s")),
    Field('user_proj','string',requires=IS_IN_DB(db,db.project.id
,"%(name)s",multiple=True)),
    Field('owner_proj','string',requires=IS_IN_DB(db,db.project.id,"%(name)s",
multiple=True)),
    Field('reader_proj','string',requires=IS_IN_DB(db,db.project.id
,"%(name)s",multiple=True)),
    Field('password', 'password', length=512,
          readable=False, label='Password'),
    Field('registration_key', length=512,
          writable=False, readable=False, default=''),
    Field('reset_password_key', length=512,
          writable=False, readable=False, default=''),
    Field('registration_id', length=512,
          writable=False, readable=False, default=''))


So I have a controller where a super user can modify user_proj, owner_proj
and reader_proj, but when I get into the controller the already saved values
in those fields doesn't appear populated, and I if save it without changes
it erases the values.

Reply via email to