Hi,
Been banging my head against this for a bit - the following code in
mako:
<%
selectvals = {'U':'Not specified','M':'Male','F':'Female'}
%>
${selectvals[c.Gender]}
- change to:
${h.select('gender', c.Gender, selectvals.items())}
(where c.Gender is set to 'F' for example) quite happily displays
Female - change to: and then the select box, but with no default! I
cannot seem to get it to work - it works fine if integers are used,
but refuses when a string is used. The Html output is:
Female - change to:
<select name="gender">
<option value="M">Male</option>
<option value="U">Not specified</option>
<option value="F">Female</option>
</select>
using WebHelpers 0.6.3.
am I missing something? Thanks.
D
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---