But why bother? web2py's SQLFORM in controller contains built-in
server-side validation and other goodies. Besides it sets up correct
form key for you, of course. And you can always customize the view to
whatever you want to. So why insist to do things in opposite
direction, which drown you in unnecessary trivia form key issue?

On Sep19, 2:19pm, eddwinston <eddwins...@gmail.com> wrote:
> Hi Wes,
>
> That was not what i meant, I want to creat the form on the view and
> not in the action. I created initialised an SQLFORM object but wont
> return it to the view because i want to create my own form. I only use
> the _formname to identify the form for processing. But I want a
> _formkey on this form i created on the view. How can I achieve this? I
> dont know if this is clear now. Thanks
>
> Winston
>
> On Sep 19, 12:45 am, Wes James <compte...@gmail.com> wrote:
>
>
>
> > Do you have a
>
> > form=FORM()
> > return dict(form=form)
>
> > in your controller
>
> > I just tried it and I get this:
>
> > <div class="hidden"><input name="_formkey" type="hidden"
> > value="8541c665-38de-4a84-9056-22b208aa45ad" /><input name="_formname"
> > type="hidden" value="default" /></div>
>
> > {{=wes}}
>
> > On Fri, Sep 18, 2009 at 3:35 PM, eddwinston <eddwins...@gmail.com> wrote:
>
> > > Hi,
>
> > > But just using {{=form.hidden_fields()}}  does not generate a form key
>
> > > On Sep 18, 10:56 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > >> {{=form.hidden_fields()}}
>
> > >> will create the <input type="hidden">....
>
> > >> On Sep 18, 2:39 pm, eddwinston <eddwins...@gmail.com> wrote:
>
> > >> > Hi,
>
> > >> > If I create a form on the view and not from the controller action, how
> > >> > can the form get a unique form key? Thanks
>
> > >> > Winston
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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