Bypass django form validation on new form instance

Posted by Thomas Schultz on Stack Overflow See other posts from Stack Overflow or by Thomas Schultz
Published on 2010-05-03T19:56:09Z Indexed on 2010/05/03 19:58 UTC
Read the original article Hit count: 331

Filed under:
|
|

Hello! I have a situation where we are trying to autofill some form data on the second page of a signup and I was wondering if there's a way to bypass the entire form validation when we pass in only a couple of fields?

so we have something like

form = NewForm(request.POST)

Where request.POST only contains some of the fields in NewForm(). So the page loads and there is feedback about how some fields are not filled in yet.

This all happens from the GET request of the second page.

Is there a way to do something like...

form = NewForm(request.POST, validate=False) 

© Stack Overflow or respective owner

Related posts about django

Related posts about form-validation