Thanks for replies. @Mengu:
Well I could simply do it with javascript and change form action on submit to '/compare' if the submit button clicked is [Compare selected]. But what about users with js disabled? @Wyatt: Consider this sample HTML produced by my already existing template (beside note: I'm using pyramid_simpleform): http://jsfiddle.net/AMyjJ/ * Consider New action, when user clicks [New] submit button: request hits *profile* view ('/profile') and I simply redirect user to '/new' like this: if 'new' in request.params: return HTTPFound(location=request.route_url('new')) So user can create his new item in *new* view. * With Compare action things get harder since I cannot only redirect to *compare* view, I also need to pass ids of selected checkboxes. Javascript solution I mentioned above is neat (see http://jsfiddle.net/AMyjJ/ ) and I could force users with js disabled to go to '/compare' and make their selections on that page. What I was wondering is if there's a way to transfer a request to another **along with redirection from one URI ('/profile') to another ('/compare')** Thanks for your interest neurino On Sep 29, 6:55 pm, Wyatt Baldwin <[email protected]> wrote: > I'm not sure I follow this exactly, but could you create a template fragment > (a %def in Mako) that contains the form and then call it with the > differentiating args? Something like this: > > <%def name="make_form(action, submit_value)"> > <form method="POST" action="${action}"> > <!-- form controls here --> > <input type="submit" value="${submit_value}" /> > </form> > </%def> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
