Hi,

This is my database definition:

db.define_table('room',Field('room_size','integer',requires=IS_NOT_EMPTY()),
                Field('room_nos','integer',requires=IS_NOT_EMPTY()),
                Field('building',requires=IS_IN_SET(['DH Hill','James B 
Hunt'])),
                Field('status',requires=IS_IN_SET(['Available'])),              
  
                auth.signature)


db.define_table('booking',
                Field('room','reference room'),
                Field('username', 'reference auth_user'),
                Field('start_time','datetime'),
                Field('end_time','datetime'),
                auth.signature)


This is my controller code for rooms controller:

def create():
    newroom = SQLFORM(db.room).process()
    return locals()


I expect dropdowns to be created for both room and username in my view. But I 
see a dropdown only for username and not for room. PFA screenshot. Could 

anyone please let me know the fix for this. I tried creating a form with 
SQLFORM.factory and using IS_IN_DB, but that did not create a dropdown for me.

Thanks






-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to