Since most/all of the form handling happens inside the form, you could
have 2 separate actions that redirect to different areas.
Also, you could have one form submit via ajax. Lastly, there's always
the referrer variable.

Daniel



On Jul 23, 7:24 am, "Daniel Kucharski" <dan...@inspiran.be> wrote:
> Yes, that is indeed a possibility (it corresponds to the second choice I
> mentioned before).  I am still searching for something which is more
> sustainable (if existent)
>
> From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com]
> On Behalf Of Joshua Estes
> Sent: vrijdag 23 juli 2010 14:56
> To: symfony-users@googlegroups.com
> Subject: Re: [symfony-users] Conditional based redirects
>
> Could you set a user attribute during step 1 and on your last step it checks
> for that and sends user to the url?
>
> On Jul 23, 2010 3:49 AM, "Daniel Kucharski" <dan...@inspiran.be> wrote:
>
> Hi,
>
> Sometimes I find myself often in a situation where I need to redirect from a
> given action based on how the current action was reached.
>
> For example, from a customer list a user can add a customer(which can be a
> multiple step form), which will redirect back to the customer list.
> However, a customer can also be created through a web dashboard and should
> redirect the user after creating the new customer back to the web dashboard.
>
> Some solutions that came in my mind using Symfonfy capabilities:
>
> -          Encode the call back route in the requested url (eg.
> /customer/create?redirect_after_create=dashboard_overview).  However this
> means you won't have any nice urls anymore.
>
> -          Create a new filter and store redirect data in session.  This
> will be then used to 'look back' where the user came from.
>
> Both are not really easily maintainable and a bit 'ugly'.  Anyone has any
> other solution?
>
> Kind regards,
>
> Daniel
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> <mailto:symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to