Re: Remove a field in a form subclass

2010-04-27 Thread creecode
Hello Wiiboy, Take a look at the excellent writing "Dynamic form generation" < http://jacobian.org/writing/dynamic-form-generation/ > by Jacob Kaplan- Moss. It may help you. I had a similar need to yours and ended up using the __init__ method to remove fields. Toodle-l. cree

Remove a field in a form subclass

2010-04-27 Thread Wiiboy
Hi guys, I've got a ModelForm defined like below: class ArticleForm(forms.ModelForm): title = forms.CharField(stuff) def custom_validator(): .. class Meta: model = Article I want to subclass it, but do _not_ want the title field, i.e. class SubArticleForm(ArticleFor