Is there a way to dynamically name the forms? I don't know how many forms I'll need to display, it depends on an external factor. (I have a textarea and depending on the lines filled in the textarea by the user, I need to create that many forms).
Is this possible withing web2py's FORM() helper or would using the default HTML be a better idea? Thanks! On May 6 2010, 9:17 am, mdipierro <[email protected]> wrote: > If you have two forms you have to name them: > > if form_back.accepts(request.vars, session, formname='back'): > ... > if form_membership.accepts(request.vars, > session,formname='membership'): > > On May 6, 7:19 am, Sverre <[email protected]> wrote: > > > > > > > > > I'm using this design in a controller to have buttons on the page: > > ---- > > form_membership = FORM('', INPUT(_type='submit',_value='New')) > > form_back = FORM('', INPUT(_type='submit',_value='Back to user')) > > if form_back.accepts(request.vars, session): > > > redirect(URL(r=request,c='sysuser',f='edit_user',args=userid)) > > if form_membership.accepts(request.vars, session): > > > redirect(URL(r=request,c='sysuser',f='new_membership',args=userid)) > > return > > dict(msg=rows,form_membership=form_membership,form_back=form_back) > > ---- > > But this isn't working. I'm don't get the right redirections. The > > "Back to user' button gives me the redirection of the other button. > > Has someone a clue?

