It works great !

Because a "list:reference" field gets a default constraint, I
deleted :
"IS_IN_SET(['Apples','Oranges','Bananas','Kiwis','Lemons'],multiple=True)"
I put no requirement.

How can I limit the size of a "list:reference" field ? I don't want
more than 8 people for example.

Thanks a lot,
Archibald

On 25 oct, 02:23, Archibald Linx <archibaldl...@gmail.com> wrote:
> The documentation recommands the multiple select plug-in.
>
> http://www.web2pyslices.com/slices/take_slice/70
>
> Sorry,
> Archibald
>
> On 25 oct, 01:18, Archibald Linx <archibaldl...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Thank you very much Richard and Anthony !
>
> > What's the easiest way to use these fields in the controller and the view ?
>
> > Archibald
>
> > 2011/10/25 Anthony <abasta...@gmail.com>
>
> > > Even better, use auth.settings.table_user_name instead of 'auth_user', in
> > > case the user table has a name other than 'auth_user'.
>
> > > On Monday, October 24, 2011 5:25:39 PM UTC-4, Richard wrote:
>
> > >> I think you have mistake :
>
> > >> Field 
> > >> <http://web2py.com/book/default/docstring/Field>('tags','list:reference 
> > >> tag'))
>
> > >> In that case "tag" is you table...
>
> > >> So when uselist:reference you don't use the db.auth_user just "auth_user"
>
> > >> Also you don't specified the db.auth_user.username since username is not 
> > >> a
> > >> default field of auth_user and you maybe want to specified the
> > >> representation of thelist:reference field since it is a integer and 
> > >> replace
> > >> it by the name or email of the user...
>
> > >> To do that you need to user .represent()
>
> > >> I let you read futher in the book..
>
> > >> Richard
>
> > >> On Mon, Oct 24, 2011 at 5:19 PM, Archibald Linx 
> > >> <archib...@gmail.com>wrote:
>
> > >>> Dear Web2py users,
>
> > >>> Do you sometimes use fields which are lists ofusernames?
>
> > >>> How would you write that : Field('usernames','list:**reference
> > >>> db.auth_user.username')) ?
>
> > >>> Thanks a lot,
> > >>> Archibald

Reply via email to