Closed labrocadabro closed 10 years ago
Your code example doesn't call super()
. Are you sure this doesn't work?
def NameForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(NameForm, self).__init__(*args, **kwargs)
self.fields['name'].required = True
Sorry, I forgot super in the example, but in my actual code it is there and it's still not working.
Can you elaborate on this a bit more? It's not possible to reproduce this without any further information. I will close the issue for now. Please feel free to reopen it if you experience the issue in the future and think it's a bug in floppyforms.
Example:
The required attribute will not show, and ignore the True setting. Conversely, setting required=False in init will not remove the required attribute.