On Sat, May 12, 2012 at 07:51:01AM -0700, brian wrote:
> The redirect method isn't working. I use middleware to insert a form
> into the context for each page. When I try to redirect with a
> fragment identifier, then the page scrolls but I don't see the form
> errors. If I remove the error form
The redirect method isn't working. I use middleware to insert a form
into the context for each page. When I try to redirect with a
fragment identifier, then the page scrolls but I don't see the form
errors. If I remove the error form redirect then I see the errors but
this removes the scroll.
H
Few things you could do, but I think this is more of a browser / JS related
topic than django.
1.) Post the form to an iframe, and in the iframe return javascript code to
redirect or throw error about form content.
2.) Make the form post ajax based (bit harder, with csrf) and as above have
the pa
cannot you 'redirect' to the whole url like this:
if form.is_valid():
thank you page
else:
*return redirect('http://www.test.com/form#filled') *
*
*
or you can also redirect just to /form#form/ i think...
*
*
*
*
Am Freitag, 11. Mai 2012 23:43:50 UTC+2 schrieb brian:
>
> I have form that
I have form that is toward the bottom of a web page. If someone
submits some bad data, I want the page to scroll to the form.
Currently if the data is bad, I can see the page get refreshed and the
browser scrolls to the top of the screen. When I get an error in a
submitted form, how do I get it t
5 matches
Mail list logo