On May 4, 8:29 pm, dlypka <dly...@gmail.com> wrote:
> Thanks again John.
>
> I was able to piece together snippets from your example and
> that made our sample work for crud update finally.
> It correctly validates the empty field and displays the error message.
>
> The 3 fixes I made were
>
> 1. The hidden fields at the bottom helped, I believe:
>     <input value="{{=form.formkey}}" type="hidden" name="_formkey" />
>     <input value="{{=form.formname}}" type="hidden" name="_formname" /

or just {{=form.hidden_fields()}}

>
>
>
> 2.
> <form action=="{{=request.env.path_info}}"   <-- I was missing that
> code in the ""
>
> 3.
> in the Controller, the key important logic for the case of a crud
> update was
>     elif session.action == "update":
>         id=request.args[0]
>         response.view="%s/%s/%s.html" %
> (request.controller,request.function, request.args[0])
>         return dict(form=crud.update(db.testtable,id))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to