On Sat, Oct 22, 2011 at 12:45 PM, Asif Jamadar <[email protected]> wrote: > But I have same lables( or names) in my choice list > > Choices = [ ('attr1', 1), ('attr1', 2), ('attr1' , 3) , ('attr2', 1), > ('attr2', 2), ('attr2', 3) ] > > All these are displayed as radio buttons. > > When I select 2 then it is returning me "attr1". But how should I get the > value itself that is "2"?
Umm, this is not the label. Please be clear about what you want. I don't think that you can get that from form.cleaned_data, but again, given the value from form.cleaned_data, and given that you already know the choices themselves, can't you simply look these up. Regards, Gora _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
