[BangPypers] Getting label of the choicefield in django form

Asif Jamadar asif.jamadar at rezayat.net
Sat Oct 22 09:15:36 CEST 2011


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"?




More information about the BangPypers mailing list