Thank you Massimo.

I already applied your solution.
I verified the request.vars.category_id content. It's "None".

ionel


On 31 Ian, 22:18, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I am sure category_id is in request.vars.category_id
>
> accepts will not move it in form.vars.id it is not obvious that is
> what you want to do. Try
>
> form=SQLFORM(db.book,
>          fields=['author','title'],
>              hidden=dict(category_id=the_category_id),
>         submit_button='Add')
> form.vars.id=request.vars.category_id
>
> Massimo
>
> On Jan 31, 8:19 pm, ionel <ionelanton...@gmail.com> wrote:
>
> > I have the following example:
>
> > the_category_id = 1
>
> > form=SQLFORM(db.book,
> >         fields=['author','title'],
> >             hidden=dict(category_id=the_category_id),
> >        submit_button='Add')
>
> > After submit, the field "category_id" has no content.
> > I verified the source code of my page. The value is there: <input
> > name="category_id" type="hidden" value="1" />
>
> > I don't understand what is the problem.
>
> > Thank you
>
>
--~--~---------~--~----~------------~-------~--~----~
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