No it is not. Something in the code must be resetting it.
On Thursday, 4 April 2013 22:13:25 UTC-5, 黄祥 wrote:
>
> hi,
>
> is it normal for list:string type field is empty when on editing page?
>
> e.g.
> db.define_table('contact',
> *Field('salutation'),*
> Field('first_name'),
> Field
is it related to the other field constructor, like required, label, etc?
and for controller i'm using grid.
*default.py*
@auth.requires_login()
def contact():
grid=SQLFORM.grid(db.contact, user_signature=False)
return locals()
*db_wizard.py*
# create table : contact
db.define_table('cont
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
db.define_table('gender',
Field('gender', 'list:string'),
format='%(gender)s')
db.gender.gender.requires=IS_IN_SET(['Male', 'Female'])
should be
db.define_table('gender',
Field('gender', 'list:string'),
format='%(gender)s')
db.gender.gender.requires=IS_IN_SET(['Male', 'Female'],m
yeah, my mistake.
thanks for correct me
--
---
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
Thanks for your work around. I see this too. It seems more convenient to
use:
Field('gender','string',requires=IS_IN_SET(('Male', 'Female')))
as this will keep the default when in edit.
On Sunday, April 7, 2013 at 10:00:28 PM UTC-7, 黄祥 wrote:
>
> i've already start testing using the simple t
6 matches
Mail list logo