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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---