2

I would like a success message to show when updating (NOT CREATING) a list item in a custom sharepoint list. Is there a quick and dirty way of doing this using JS? I would like to avoid VS development if possible as this project is supposed to be a quick turnaround.

I already have a custom edit form in place.

An alternative would also be to send the user to a success page. I am really just looking for the simplest way possible at this point.

  • What do you mean confirmation message, "Are you sure you want to save your changes?" or something like this? – Andrey Markeev Sep 6 '13 at 18:09
  • I guess you could call it more of a success message. "Your item has been saved".... – BlueBird Sep 6 '13 at 20:06
4

Create custom edit form using SPD so that DataFormWebPart is generated:

enter image description here

Go to this form and edit it. Find the following code:

<SharePoint:SaveButton runat="server" ControlMode="Edit" id="savebutton1"/>

Replace it with the following code:

<input type="button"
       value="Save"
       onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/Pages/MySuccessPage.aspx}')}" />

Do the same for

<SharePoint:SaveButton runat="server" ControlMode="Edit" id="savebutton2"/>

Save changes.

Now after editing user will be redirected to /Pages/MySuccessPage.aspx.

The approach is tested and based on my testing works fine both in SP2010 and SP2013.

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.