Thank you again, you solved two problems of mine today
On Sunday, October 7, 2012 7:23:04 PM UTC-7, Anthony wrote:
>
> Something like:
>
> SELECT(*[r.type for r in db().select(db.tiers.type)], ...)
>
> SELECT() takes OPTION() elements as its components, but if you give it
> items not wrapped in O
Something like:
SELECT(*[r.type for r in db().select(db.tiers.type)], ...)
SELECT() takes OPTION() elements as its components, but if you give it
items not wrapped in OPTION, it will automatically do so.
Anthony
On Sunday, October 7, 2012 9:42:06 PM UTC-4, dave wrote:
>
> so how do I go about
so how do I go about doing that, I have this so far SELECT(_type='text',
_name='test0', requires=IS_IN_DB(db, db.tiers.type, '%(type)s')))
On Sunday, October 7, 2012 6:21:49 PM UTC-7, Anthony wrote:
>
> Yes, you have to include the options in the SELECT() -- the SELECT()
> doesn't know it shoul
Yes, you have to include the options in the SELECT() -- the SELECT()
doesn't know it should get the options from the IS_IN_DB validator.
Anthony
On Sunday, October 7, 2012 3:01:48 PM UTC-4, dave wrote:
>
> ok I got it to display using select()
>
> SELECT(_type='text', _name='test0', requires=I
On Sunday, October 7, 2012 4:57:06 PM UTC-4, Niphlod wrote:
> that's because web2py doesn't know what you expect to be filled in your
> model. If you add the requires= bit to your "type" field, then
> automatically web2py will turn that field into a SELECT with the correct
> options.
>
It won'
I did requires=IS_IN_DB(db, db.tiers.type, '%(type)s')
On Sunday, October 7, 2012 1:57:06 PM UTC-7, Niphlod wrote:
>
> that's because web2py doesn't know what you expect to be filled in your
> model. If you add the requires= bit to your "type" field, then
> automatically web2py will turn that fi
that's because web2py doesn't know what you expect to be filled in your
model. If you add the requires= bit to your "type" field, then
automatically web2py will turn that field into a SELECT with the correct
options.
On Sunday, October 7, 2012 9:01:48 PM UTC+2, dave wrote:
>
> ok I got it to d
ok I got it to display using select()
SELECT(_type='text', _name='test0', requires=IS_IN_DB(db, db.tiers.type,
'%(type)s')))
now the problem is it wont populate the options of the dropdown box from
the database
On Sunday, October 7, 2012 7:33:54 AM UTC-7, Anthony wrote:
>
> There are two se
There are two separate issues -- the validation of the submitted values,
and the widget displayed in the form to input the values. In your case, the
validation should still work, but you won't get the widget because the
widget is added by the SQLFORM __init__ method, which is called before you
9 matches
Mail list logo