On Dec 14, 11:34 pm, Chris McDonough <chr...@plope.com> wrote:
> On Wed, 2011-12-14 at 07:19 -0800, rihad wrote:
> > Doesn't Deform fill in the form with the values submitted when a
> > validation error occurs?
>
> Can you describe what's unclear 
> abouthttp://docs.pylonsproject.org/projects/deform/en/latest/basics.html#v...
>
I'm very sorry, my bad. I had

if request.POST:
           try:
                   form_data = myform.validate(request.POST.items())
           except ValidationFailure, e:
                   return { 'form': e.render() }

        rendered_form = myform.render()

        return { 'form': rendered_form }

When there were no validation errors myform.render() still showed
"There was a problem with your submission blah blah", leaving the
field empty. "myform" must still have form errors attached to it,
although not previously entered data.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to