Supporters of End User
Web

URL Source= for Thank You on Submit

 
Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.
Categories: 

Jeff JonesGuest Author: Jeff Jones, SharePoint on a String

Jeff Jones is a SharePoint developer and administrator in Chicago, IL.   He enjoys whiteboarding, peer coding, and being creative with software.  He has over 6 years of SharePoint experience and holds MCSE and MCTS certifications.

From Jeff Jones: Many times I�ve been asked to adjust the NewForm.aspx (add record) experience for users to display a custom message after submit.    A �Thank You� page for a survey is a great example.    Other times in request forms people want to show a confirmation or instructions page.

Thankfully the SharePoint product team made this easy for us developers.

Action Steps

  1. Visit the list or library you�d like to tweak
  2. Click on New item to get to /NewForm.aspx
  3. Take a close look at the URL and notice the word �Source=�
  4. We�ll come back to this in a minute
  5. To create a �ThankYou.aspx� page I like to duplicate the �DispForm.aspx� by going into SharePoint Designer
    1. Right click Copy on DispForm.aspx
    2. Right click and Paste
    3. Edit the file to remove the main web part
    4. Rename the file to �ThankYou.aspx�
  6. Edit the part after the equals sign (=) from #3 and replace with a URL you�d like to take people to after submit

Often the destination page for #5 above doesn�t yet exist.   So you�ll want to open SharePoint Designer 2007 and create a new ASPX page to hold a �Thank You� message.    For this I always place the ASPX file in the same /Forms/ folder as the list I�m working on.   

Comments

Vamshi

URL Source= for Thank You on Submit

Hi Jeff,

Interesting article.. but how to we get to change the destination URL? so that everyone can get to the same destination URL. I mean.. if you respond to the survey..it still points to Overview.aspx instead Thankyou.aspx... do you think we can solve it using SPD?

Thanks
Vamshi

Posted 23-Jul-2009 by Vamshi
Caleb

URL Source= for Thank You on Submit

If you are creating a custom new list form in SPD (Insert > SharePoint controls > Custom List Form), you can right-click on the OK button and choose Properties and change the RedirectURL value in the Tag Properties pane.

Or, if you don't want to use the default buttons, you can insert a form action button from the Toolbox. A form actions box will automatically pop-up with an option for "Navigate to page".

Posted 23-Jul-2009 by Caleb
Jeff Jones

URL Source= for Thank You on Submit

Hi Vamshi,

Very good question. I'm a big JavaScript fan and a little biased that way when I think about solutions.

How about adding JavaScript on the NewForm.aspx page to "fix" the URL if pointed at Overview.aspx?

Modifying the system button for "Respond to this Survey" I'm not sure how to do and doubt is supported.

The quick way would be like:

if (document.location.href.indexOf("overview.aspx")>0) {
document.location.href="";
}

Posted 23-Jul-2009 by Jeff Jones
Vamshi

URL Source= for Thank You on Submit

Hi Caleb and Jeff,

Thanks for the response

Both of the options are great. The disadvantage we have by creating custom list forms is we loose the ability to attach files and Form Action works really well to navigate to a different page.

Both Javascript and Form actions buttions are really cool. But now I am thinking.. how to we utilise this URL "Source=" functionality??? any ideas..?

Thanks

Posted 23-Jul-2009 by Vamshi
Caleb

URL Source= for Thank You on Submit

Vamshi,
You're right, you do lose the ability to attach files, which is a bug that MS apparently has no plans to fix. Definitely something to consider.
If there's any consolation, the file attachment is still available in the editform.

Posted 23-Jul-2009 by Caleb
Chuck Whittemore

URL Source= for Thank You on Submit

I followed the steps dutifuly, only to discover that the solution breaks when branching is used within the survey. Has anyone else encountered this and found a path to resolution?

Posted 23-Jul-2009 by Chuck Whittemore
Brad Brickman

URL Source= for Thank You on Submit

Does this require MOSS or can it also be done in WSS? I am having difficulty with the redirect URL.

Posted 24-Jul-2009 by Brad Brickman
Jeff Jones

URL Source= for Thank You on Submit

Hi Brad,

Yes, this can be done directly with WSS. It also works on any list template. Calendar, Task, Documents, etc.

Best,
Jeff

Posted 25-Jul-2009 by Jeff Jones
Mark

URL Source= for Thank You on Submit

I know this blog is a bit old now, but is it possible to set this so that the default for all users is to go the Thanks.aspx page.

From your instructions above, it looks like it's a one time only redirect.

My survey has branching enabled, and is open to all authenticated users. I want them to be directed to the thank you page when they've completed, rather than the summary or overview page.

Thanks

Posted 13-Oct-2010 by Mark
Jeff Jones

URL Source= for Thank You on Submit

Hi Mark,

The redirect is part of the original request URL. So it all depends on how people get into the "NewForm.aspx" page. Typically I see HTTP links manually entered into an email where it easy to add the "?Source=ThankYou.aspx" suffix.

JavaScript could help by adding the "?Source" URL parametric if missing. Adding a Content Editor Web Part to host JS code on the ASPX page guarantees no matter how people visit the page it can add the URL paramter (if missing).

Check out insertParam() at http://stackoverflow.com/questions/486896/adding-a-parameter-to-the-url-with-javascript

Best,
@spjeff

Posted 13-Oct-2010 by Jeff Jones
Mario Zepeda

Thank you page

What if I don't have access to SharePoint Designer? How will this work

Posted 12-Nov-2013 by Mario Zepeda
yitoyitoytyo

yitoyitoytyo

Acero inoxidable y modelos Relojes Especiales bicolor son conducidos por el calibre Omega coaxial 8602. Equipado con una espiral Replica de relojes de silicio Si14, certificada oficialmente este cronógrafo movimiento COSC goza de una garantía completa de cuatro Rolex Submariner años (al igual que en otros lugares el 8612). El cristal de zafiro transparente.

Posted 17-Apr-2014 by yitoyitoytyo

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: