the following line works perfectly: 

grid = SQLFORM.grid(db.auth_membership)

by "perfect" in the context, I mean that when I click "add record", the 
group id field contains both values, group id and group role (for example, 
"Manager (4)", "Loyal customer (9)", ... 

However, I want to limit what kind of membership a user can create, so here 
is what I do: 

   ids = [1,3,5]
   db.auth_membership.group_id.requires = IS_IN_SET(ids)
   grid = SQLFORM.grid(db.auth_membership)

This indeed limits group id field value that a user can specify when 
creating a new record. When clicking "Add record", the group id field is 
represented by a drop-down with the values "1, 3, 5", as expected. 

The problem is that now when limited to 1, 3, and 5, no roles are 
displayed. Only group id integer values are (to reiterate, without this 
limitation to 1,3,5 the drop-down contains both, group id and group role 
for each line, for all the groups). 

How can I ensure that the roles are also displayed, in addition to group 
ids, on add record, when using  requires=IS_IN_SET ? 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/bbc19ca8-7701-43c3-a14d-2ac36639dbfe%40googlegroups.com.

Reply via email to