How to disable specific field validaton in form?

40 views
Skip to first unread message

galgal

unread,
Jul 20, 2011, 8:57:25 AM7/20/11
to django...@googlegroups.com
I need to disable field validation in ModelForm. I want this validation not to validate some field. I have some situations (AJAX rendering form) when I want to return more complex form with additional fields. I pass POST to the form and render new one with post fields saved. Some new fields are added and they can't be validated. I pass flag to form and recognize when it happens. Should I make it in some clean functions?

SmileyChris

unread,
Jul 20, 2011, 7:15:23 PM7/20/11
to django...@googlegroups.com
Would it be acceptable to just not bind the form at all in the situation where you want to return the more complex form? Something like:

YourForm(initial=dict(request.POST.items()))
Reply all
Reply to author
Forward
0 new messages