Hi Anthony,

I read in the book that "requires' will be set by default for
"list:reference". I tried this, and the output is the same as with
IS_IN_DB(...,
multiple=True), which is a multiple item box listing all options as shown
in the pic below:
[image: Inline image 1]
And I still don't understand why the value of the field is '1L' instead of
'1' as in t_contacts.id..

Regards,
Spring


On Sun, Apr 7, 2013 at 8:42 PM, Anthony <[email protected]> wrote:

>     Field('f_keypersons', type='list:reference t_contacts', requires=
>> IS_IN_DB(db, 't_contacts.id', '%(f_name)s'),
>
>
> For list:reference fields, it should be IS_IN_DB(..., multiple=True).
> Actually, you shouldn't need to set the "requires" attribute explicitly
> anyway because you will get IS_IN_DB(..., multiple=True) as the default
> validator for a list:reference field.
>
> Anthony
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/zZ7LHTCcUUA/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


<<2.png>>

Reply via email to