[web2py] Re: cannot get a multiselect list

2013-12-09 Thread Massimo Di Pierro
The extra ] was just a cut and paste error.

On Monday, 9 December 2013 14:38:02 UTC-6, Dave S wrote:
>
>
>
> On Sunday, December 8, 2013 8:25:06 AM UTC-8, 黄祥 wrote:
>>
>> requires=IS_IN_SET(ngotype]),
>>>
>>>
>> are you sure? there is unbalance bracket [] on that
>> i mean:
>>
>> requires=IS_IN_SET(ngotype]),
>>
>> should be
>>
>> requires=IS_IN_SET(ngotype),
>>
>>
> The extra paren is from the FIELD helper, isn't it?
>
> /dps
>  
>
>>
>> best regards,
>>
>> stifan
>>
>>

-- 
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/groups/opt_out.


[web2py] Re: cannot get a multiselect list

2013-12-09 Thread Dave S


On Sunday, December 8, 2013 8:25:06 AM UTC-8, 黄祥 wrote:
>
> requires=IS_IN_SET(ngotype]),
>>
>>
> are you sure? there is unbalance bracket [] on that
> i mean:
>
> requires=IS_IN_SET(ngotype]),
>
> should be
>
> requires=IS_IN_SET(ngotype),
>
>
The extra paren is from the FIELD helper, isn't it?

/dps
 

>
> best regards,
>
> stifan
>
>

-- 
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/groups/opt_out.


[web2py] Re: cannot get a multiselect list

2013-12-08 Thread 黄祥

>
> requires=IS_IN_SET(ngotype]),
>
>
are you sure? there is unbalance bracket [] on that
i mean:

requires=IS_IN_SET(ngotype]),

should be

requires=IS_IN_SET(ngotype),


best regards,

stifan

-- 
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/groups/opt_out.


[web2py] Re: cannot get a multiselect list

2013-12-07 Thread Massimo Di Pierro


requires=IS_IN_LIST([ngotype])),

should be


requires=IS_IN_SET(ngotype]),


On Saturday, 7 December 2013 05:35:12 UTC-6, Dreamer wrote:
>
> ngotype = 
> ['Education','Environment','Food','Health','Makewish','Orphanage','Water','Women']
> db.define_table('ngo',
> Field 
> ('ngo_type',requires=IS_IN_LIST([ngotype])),
> Field 
> ('ngo_name', 'text'),
> Field 
> ('contact_person','text'),
> Field 
> ('email', 'reference 
> auth_user'),
> Field 
> ('telephone','integer'),
> Field 
> ('established', 'date'),
> Field 
> ('visiting_time', 'text'),
> Field 
> ('about_ngo','text'),
> Field 
> ('activities', 'text'),
> Field 
> ('impact', 'text'),
> Field 
> ('no_dependents','integer'),
> Field 
> ('images','upload'),
> Field 
> ('event_date','date'),
> auth.signature)
>
> I wish to implement a multiselect option for a reqistering ngo through 
> IS_IN_LIST, i could include the whole list within the table i.e. 
> requires=IS_IN_LIST(['first','second']) however i want to provide an option 
> to the registrar to add a to a list thats why i have defined 
>
> ngotype = 
> ['Education','Environment','Food','Health','Makewish','Orphanage','Water','Women']
>
> please suggest what can i do to enable a multiselect and also allow 
> registrars to add the ngo type just in case it dont happen be in the list. or 
> do i use the IS_IN_DB()
>
> Thanks in advance.
>
>

-- 
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/groups/opt_out.