Could someone test something similar to this out?  Am I getting this wrong 
with setting the default values in this field?  It feels like a bug in 
web2py.


On Wednesday, August 3, 2016 at 1:20:50 PM UTC+3, Encompass solutions wrote:
>
> It seems that my SQLFORM.factory won't populate default values.  Are you 
> guys getting similar or am I doing this wrong?
> Here is what I am doing.
>
> emails = []
> for member in members:
>         emails.append(member.email)
> form = SQLFORM.factory(Field("members", "list:string", 
> requires=IS_LIST_OF(IS_EMAIL(error_message="Invalid email found."))), 
> default=emails)
>
> I am hoping emails should actually be in the list but they don't show up. 
>  It shows a blank form, as attached.  All other aspects of the form work 
> just fine including the validation and repopulating the form if it was not 
> valid.
> Any ideas?
> BR,
> Jason Brower
>
>

-- 
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