How do I make it so that the form does not resubmit upon clicking the 
browser reload button even when the form has errors, but still display the 
errors? I just hate form resubmissions popping up ever. Nobody ever uses 
that "feature" of browsers intentionally.

On Tuesday, September 28, 2010 12:52:16 AM UTC-4, mdipierro wrote:
>
> When you say "refresh the page" you mean you "click the reload 
> button". That causes a form re-submission. 
>
> To prevent it, redirect(URL()) after form.accepts(...) 
>
> On Sep 27, 11:31 pm, Audra Rudys <sphin...@gmail.com> wrote: 
> > Hi all, 
> > I'm new to web2py and just dipping my toe in with a simple posting form 
> (2 
> > fields, a summary and description, displays form and the previously 
> > submitted values below -- date posted, summary, description.)  I notice 
> that 
> > after posting, my summary and description are cleared out in the form, 
> > however, if I refresh the page, the last post I had gets reposted, 
> resulting 
> > in duplicates.  I have a validator on summary and description so if 
> they're 
> > blank, it doesn't allow the user to post with the submit button, but 
> this 
> > doesn't kick in with refresh.  Is there a trick for stopping this, 
> wouldn't 
> > want these duplicates in a live application database. 
> > 
> > By the way, kudos to all the developers/folks working on web2py, what a 
> > great framework!  Can't wait to use more of its functionality! 
> > 
> > Thanks, 
> > Audra

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to