When you pass a list of strings to the SELECT helper, it creates an
html select control, with options populated from the list of strings,
and each string is both the option's value and label.
so, SELECT(['one, 'two']) yields
<select>
<option value="one">one</option>
etc.
Does SELECT provide for the other common usage scenario, where you're
trying to create a list of options that have, say, an integer id as
the value and a string label as the contents of the option?
(That is, something like SELECT([ ('1', 'one'), ('2', 'two')])
yielding:
<select>
<option value="1">one</option> .. etc.
)
So, is it possible to pass in a list of tuples to SELECT (instead of
just a flat list)?
If not, would you accept a patch to make that possible?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---