Redirect Users to Thank You page from NewForm.aspx after form submission
Requirement: Redirect to a page after adding a new item to a list.
Here is my requirement: I have a SharePoint request tracking system. When users create a new entry, what I want is to redirect them to “Thank you! We have received your request. We will get back to you on this soon!”, typical acknowledgment page 🙂
So, to redirect page after form submission in SharePoint, create a custom NewForm.aspx, hide the default “Ok” and “Cancel” buttons, and then insert the below code:
Redirect NewForm, EditForm Submit button:
Change SharePoint Cancel button Redirect:
Alternate approach: Using Source URL Parameter in SharePoint List Forms
If you want to send users to some other page (Doesn’t matter whether the user press “Ok” or “Cancel”), SharePoint allows us to control OK and Cancel button behavior with the “source” parameter. Here is an example:
There is one issue when using the Source parameter is: you will get Thank you page even when you click on the “Cancel” button. Let’s mitigate that by adding jQuery: It binds a function with the “Cancel” button’s click event. (Edit the NewForm.aspx page and add a CEWP, just below NewForm Fields. Place this script in a text file, upload and point it from a CEWP)
SharePoint: redirect cancel button
Related Post: SharePoint Survey Redirect to Thank You Page on Finish
5 thoughts on “Redirect Users to Thank You page from NewForm.aspx after form submission”
Please guide me:
I want in the second approach function is working but data is saving in the list.
Thanks in advance
Hi Can you please help with anonymous users. The &Source= does not work for anonymous users
Prompts for Missing Required Fields
Once the Required Fields Have been Entered Cookie is Placed on the users computer.
If same user attempts to open page with cookie, user is redirected to a new web page stating the form has been filled out.
I have added one HTML button on the Default SharePoint 2010 List Edit form dynamically using Jquery.
at the time of button click. i get error “Object expected”
Any idea why.
i also tried other option.
in the second approach function is working but data is not saving in the list.
Thanks in advance
Thanx! This artical really helped me ! but one problem is that when me submited data i dont need to go back button (<=)