items = db().select(db.c_sub.ALL)
form = SQLFORM.factory(*[Field(item.name, type='boolean',
default=False, comment=item.c_main.name) for item in items])
Le mercredi 11 novembre 2015 20:47:21 UTC+1, Anthony a écrit :
>
>
> When I input a composed value for that field like : fruit-apple
>>
>> I get this when reading the corresponding table to compose a form
>> <type 'exceptions.SyntaxError'> Field: invalid field name: fruit-apple,
>> use rname for "funny" names
>>
>
> Please show the code you are using to "read the corresponding table to
> compose a form". Sounds like you are using a value stored in the field as
> the field name.
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.