So it does!  That solves my problem.  Thank you.

On Mar 6, 1:56 pm, "mr.freeze" <nat...@freezable.com> wrote:
> Unless you have a material entry with an empty material.name in your
> database, IS_IN_DB should prevent an empty submission.
>
> On Mar 6, 11:44 am, raven <ravenspo...@yahoo.com> wrote:
>
> > I have a field that references another table
>
> > Field('material', db.material)
>
> > I can get SQLFORM to give me a drop down list of available material
> > names
>
> >     Field('material', db.material,
> >                requires=IS_IN_DB(db,'material.id','material.name'))
>
> > I can get SQLFORM to insist on filling the field
>
> >     Field('material', db.material,
> >                requires=IS_NOT_EMPTY())
>
> > I would like to get both at once.  However
>
> >     Field('material', db.material,
> > requires=[IS_IN_DB(db,'material.id','material.name'),IS_NOT_EMPTY()])
>
> > does not show the drop down list.
>
> > The problem seems to be in placing IS_IN_DB inside a list,
> > because this does not work
>
> >     Field('material', db.material,
> > requires=[IS_IN_DB(db,'material.id','material.name')])

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to