I am trying to follow this article http://arabic2000.com/blog/index.php/archives/tag/display-thank-you-after-survey-is-filled but I am lost where he mentioned to find the ID of the onclick validation. I only have 1 page survey. Please sugest. Is he referring to the following code on the newform.aspx page?

<input type="button" name="ctl00$m$g_f46a290b_d993_4347_a2da_868aff18de82$ctl00$toolBarTbltop$RightRptControls$ctl01$ctl00$diidIOSaveItem" value="Finish" onclick="if (!PreSaveItem()) return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$m$g_f46a290b_d993_4347_a2da_868aff18de82$ctl00$toolBarTbltop$RightRptControls$ctl01$ctl00$diidIOSaveItem&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))" id="ctl00_m_g_f46a290b_d993_4347_a2da_868aff18de82_ctl00_toolBarTbltop_RightRptControls_ctl01_ctl00_diidIOSaveItem" accesskey="S" class="ms-ButtonHeightWidth" target="_self" />
  • How is this done in SharePoint 2010? – user4963 Sep 23 '11 at 14:21

If you only have a one page survey, it is much easier to simply use the Source query string to point to your thank you page (quickest and easiest option)

If you want it tied to a button, since you are modifying your page anyway, why not delete the standard 'finish' button and just insert a custom one which will redirect to your page.


For 2010 the above option is pretty straight forward, as you can edit the form OOTB. If however you are using 2007, it's a bit more work.

  1. Open your list in SPD
  2. In Folder view, right click the list item -> New -> SharePoint content
  3. Select the Page Tab -> General ->Create from MasterPage -> click Ok -> Select your master page -> Ok
  4. Click inside the PlaceHolderMain on the new page
  5. From the insert menu -> SharePoint Controls -> WebPart Zone
  6. Highlight the new WebPart Zone (dont click the insert webpart link)
  7. From the insert menu -> SharePoint Controls -> Custom List form -> Select your survey list -> ensure content type matches -> select New form -> Ok.
  8. Save your new page to your list with the other pages.
  9. You can now customize your buttons. You need to edit the survey list properties to set this custom page as the new item page.

In any case the ID, being referenced in the JavaScript from the article is the ID of the button control (your pasted code).

| improve this answer | |
  • I used the "Finish" button id and that did not work. If I go with your other option then How would I delete SP built in "Finish" button? It's not in newform.aspx or editform.aspx. May in the some control template? If I delete the finish button then how would I tie the same events on this new button and add redirect to it. – Nancy o'Donnell Aug 25 '11 at 22:46
  • so how do you modify in SPD 2010 (the query string option you are talking about)? – Nancy o'Donnell Aug 26 '11 at 13:32
  • Do a google/bing search and you will get a hundred examples like below: nothingbutsharepoint.com/sites/eusp/Pages/… – Jesus Shelby Aug 26 '11 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.