I just tried it from the shell
>>> form=SQLFORM(db.auth_user)
>>> form.accepts({},formname='form1')
False
>>> print form
<form action="" enctype="multipart/form-data" method="post">....<input
name="_formname" type="hidden" value="form1" /></div></form>

I think the manual is correct. Something else is wrong in your code.

On Jun 13, 6:50 pm, weheh <[email protected]> wrote:
> I have a multiple form submission with a custom form.
>
> #controller
> form1=SQLFORM.factory(db.table,...)
> form2=SQLFORM.factory(db.table,...)
> ...
> if form1.accepts(request.vars,formname='form1',onvalidation=xyz):
>    ... do something ...
>
> if form2.accepts(request.vars,formname='form2',onvalidation=xyz):
>    ... do something else ...
>
> # view
> ...
> form1.custom.begin
> ...widgets...
> <input type="hidden",name="form1",value="default" />
> form1.custom.end
>
> form2.custom.begin
> ... widgets ...
> <input type="hidden",name="form2",value="default" />
> form2.custom.end
>
> ----------
>
> The above seems to work OK. However, the input string is at odds with
> what the doc says on p. 195:
>
>   7 <input type="hidden" name="_formname" value="test" />
>
> When I recast my code as
>
>   <input type="hidden" name="_formname",value="form1" />
>
> it doesn't work.
>
> Is the doc wrong?

Reply via email to