Try Now
More in this section

Forums / Developing with Sitefinity / Redirect to Querystring URL

Redirect to Querystring URL

2 posts, 0 answered
  1. Siddesh Kapadi
    Siddesh Kapadi avatar
    239 posts
    09 Oct 2009
    30 Jan 2014
    Link to this post
    Hi Team Telerik,

    We are working with sitefinity forms and have come across a requirement that we need to redirect the user to the previous page on submit of the form. 

    The prevoius page is determined by Querystring "url".

    Is there a way I can customize sitefinity forms and work with this?

    The ideal way would be to add third radio button on editing the form under Settings in admin under: Confirmation options

    Please let me know how this can be achieved.

    Siddesh Kapadi
  2. Ivaylo Angelov
    Ivaylo Angelov avatar
    68 posts
    24 Oct 2016
    03 Feb 2014
    Link to this post
    Hello Siddesh,

    You can have a look at this forum thread where you can find an explanation and actual code sample on how to create a custom form control that extends the built-in Forms widget.
    In the overridden ProcessFromSubmitAction method, there is a check whether the form action is to redirect to another page or show the successful message. 

    Based on what you have provided me as an information, I suggest that you can modify the logic there to satisfy your needs. You can use the redirect option for the form from the backend and leave the URL field empty. Then in the code, you can add a simple check whether RedirectPageUrl is empty and if so, then pass your URL as a parameter to the Redirect method.

    Ivaylo Angelov
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered