Redirect to Querystring URL
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.
Regards,
Siddesh Kapadi
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.
Regards,
Ivaylo Angelov
Telerik