Hi
I'm trying to set custom 'name' attribute in django form.
I've been trying this kind of approach:
class BaseQuestionForm(forms.Form):
question_id = forms.CharField(widget=forms.HiddenInput)
answer = forms.ChoiceField(choices = [ ... ], widget=forms.RadioSelect)
and then setting the 'name'-attr on answer with:
form.fields['answer'].widget.name = 'new_name'
But this does not work, and name is always set to 'answer' as in field name. Is there some way to do this?