On Sat, Aug 8, 2009 at 2:04 PM, mmblnfrn<[email protected]> wrote: > > Hi all, > > I want to make a preselection of one value in the select funcion. I've made > this makro in the template: > > ${h.select(name="memberrole", > selected_values=["2"], > options=[["1","Mitglied"],["2","Administrator"],["3","Gast"]]) > } > > This is the output: > > <select id="memberrole" name="memberrole"> > <option value="1">Mitglied</option> > <option value="2">Administrator</option> > <option value="3">Gast</option> > </select> > > But I'd expect this: > > <select id="memberrole" name="memberrole"> > <option value="1">Mitglied</option> > <option selected="selected" value="2">Administrator</option> > <option value="3">Gast</option> > </select> > > > Anybody out there who can tell why there isn't a selectet string in the middle > option.
Are you using htmlfill? Htmlfill will unselect options unless you provide a valiues dict with the value selected. -- Mike Orr <[email protected]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
