locked
Can I display a confirmation when a new item is added to a list? RRS feed

  • Question

  • I have a custom list and am using the default NewForm.aspx.  I have been asked to provide a confirmation screen when a new item is added.  Is this possible?  If so, how and where?
    Thursday, June 16, 2011 8:15 PM

Answers

  • You can create a custom form in SharePoint designer and attach event handler so that after the item is added it will show you the confirmation you want.

    Another option is the SPRedirectWithID function in SPServices library. It's a JQuery based JavaScript library. You don't have to customize your form and you can do it using your browser. This function will redirect to another page you specify with the ID of the new item. In that page, you can have your confirmation and thank you message. Or you can simply have the form redirect to the display form of the list.

    http://spservices.codeplex.com/wikipage?title=$%28%29.SPServices.SPRedirectWithID&referringTitle=Documentation


    Pman
    http://www.pmansLab.com/
    • Marked as answer by Peng Lei Wednesday, June 22, 2011 3:34 AM
    Saturday, June 18, 2011 1:25 AM

All replies

  • Hello,

    Well you can use the pop-up window using window.show() method. Or you can use Jquery or JavaScript to achieve your functionality. If you are using Jquery make sure you add the related tag

     

    Hope the information helps.


    Thanks & Regards, Chandra Shekhar Rameneni
    Friday, June 17, 2011 5:47 AM
  • Try adding the javascript function for the onclick event of the button.

    this. onclick ="return confirm('confirm addtion')" should work

    Refer to the following post for more information.

    http://www.sharepointdev.net/sharepoint--development-programming/show-confirmation-dialog-on-list-item-edit-57956.shtml

     


    --Cheers
    Friday, June 17, 2011 6:49 AM
  • The link was somewhat helpful.  However, I am not asking the user to confirm the save.  I need SharePoint to confirm that the save occurred successfully and would then inform the user and thank them.  So is there a similar function to PreSaveAction() that I can use?
    Friday, June 17, 2011 2:14 PM
  • You can create a custom form in SharePoint designer and attach event handler so that after the item is added it will show you the confirmation you want.

    Another option is the SPRedirectWithID function in SPServices library. It's a JQuery based JavaScript library. You don't have to customize your form and you can do it using your browser. This function will redirect to another page you specify with the ID of the new item. In that page, you can have your confirmation and thank you message. Or you can simply have the form redirect to the display form of the list.

    http://spservices.codeplex.com/wikipage?title=$%28%29.SPServices.SPRedirectWithID&referringTitle=Documentation


    Pman
    http://www.pmansLab.com/
    • Marked as answer by Peng Lei Wednesday, June 22, 2011 3:34 AM
    Saturday, June 18, 2011 1:25 AM