You can specify labels associated with the values of an IS_IN_SET validator
in one of three ways:
values = ['list', 'of', 'values']
# As a dictionary in {value: label, ...} form:
IS_IN_SET({value: T(value) for value in values})
# As a list of tuples in (value, label) form:
IS_IN_SET([(value, T(value)) for value in values])
# Using the "labels" argument.
IS_IN_SET(values, labels=[T(value) for value in values])
Anthony
On Wednesday, July 25, 2018 at 12:40:12 AM UTC-4, rāma wrote:
>
>
> I could do this in SQLFORM readonly mode:
>
> https://groups.google.com/forum/#!topic/web2py/KnEaFsRRHL4
>
> However, how do you make SQLFORM to show the translations in edit mode. Do
> you have to modify the widget? How?
>
> Thank you.
>
--
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.