should be this:

db.define_table('t_colours', 
    Field('f_colour', type='string', label=T('Colour'))) 
db.t_colours.f_colour.requires = IS_IN_SET(('Red','Blue','Black')) 

or this:

db.define_table('t_colours', 
    Field('f_colour', type='list:string', label=T('Colour'))) 
db.t_colours.f_colour.requires = 
IS_IN_SET(('Red','Blue','Black'),multiple=True) 

You cannot have a list of strings and not allow multiple values.

On Monday, 30 April 2012 12:02:47 UTC-5, backseat wrote:
>
> In the database admin application, when editing a record from table with a 
> list:string field, the field is not pre-populated with the current value. 
>
> Test model: 
>
> db.define_table('t_colours', 
>     Field('f_colour', type='list:string', label=T('Colour'))) 
> db.t_colours.f_colour.requires = IS_IN_SET(('Red','Blue','Black')) 
>
> Insert one record. Edit it, and the combo for f_colour has the correct 
> values in the dropdown, but none is displayed by default. 
>
> Is this the expected behaviour? 
> -- 
> "You can have everything in life you want if you help enough other people 
> get what they want" - Zig Ziglar. 
>
> Who did you help today? 
>

Reply via email to