i've already start testing using the simple table (start from scratch) but got the same result. here is my conclusion, please correct me if i'm wrong : - if you combine list:string field with IS_IN_SET validator, in form edit you will receive blank value in drop down, not the existing value that stored in database. - if you want to use IS_IN_SET validator and in form edit will show the existing value that store in database, please use string type field in your define table.
*e.g. in form edit receive blank value in drop down field, not the existing value that stored in database* *db.py* db.define_table('gender', Field('gender', 'list:string'), format='%(gender)s') db.gender.gender.requires=IS_IN_SET(['Male', 'Female']) *default.py* def gender(): grid=SQLFORM.grid(db.gender, user_signature=False) return locals() *default/gender.html* {{extend 'layout.html'}} {{=grid}} *e.g. in form edit will show the existing value that store in database* *db.py* db.define_table('gender', Field('gender'), format='%(gender)s') db.gender.gender.requires=IS_IN_SET(['Male', 'Female']) *default.py* def gender(): grid=SQLFORM.grid(db.gender, user_signature=False) return locals() *default/gender.html* {{extend 'layout.html'}} {{=grid}} -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.