Thanks Anthony, it works! I have prepared this wrapper, useful for newbies
like me:
def form_prepare_opts(mydict):
return [OPTION(mydict[code], _value=code) for code in mydict]
And then, in the controller function:
countries_opts = form_prepare_opts(countries)
Which can be used to init
SELECT([OPTION(countries[code], _value=code) for code in countries])
Anthony
On Wednesday, August 29, 2012 3:15:13 AM UTC-4, Daniel Gonzalez wrote:
>
> Hi,
>
> I have the following map:
>
> countries = {
> 'DE': T('Germany'),
> 'ES': T('Spain'),
> 'IT': T('Italy'),
>
2 matches
Mail list logo