Question about requires=IS_IN_DB(db, 'table.id', '%(nombre)s')

23 views
Skip to first unread message

Eduardo Cruz

unread,
Jul 13, 2013, 6:08:26 PM7/13/13
to web...@googlegroups.com
is there a way to have something like  << requires=IS_IN_DB(db, 'area.id', '%(nombre)s') >> but that the field is not actually required? I want SQLFORM to make a html select with that field but I want to have the option to just not select any value.

Anthony

unread,
Jul 13, 2013, 7:33:47 PM7/13/13
to web...@googlegroups.com
requires=IS_EMPTY_OR(IS_IN_DB(db, 'area.id', '%(nombre)s'))

Eduardo Cruz

unread,
Jul 13, 2013, 7:38:05 PM7/13/13
to web...@googlegroups.com
Thanks!


--
 
---
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/beZQi8LKBd4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Eduardo Cruz - 829 775 4605 
Reply all
Reply to author
Forward
0 new messages