SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Fairly new to sharepoint, and working on a project which involves making custom webparts to enable extra functionality in new/edit/display webparts.

I have a working overridden SaveButton in the webpart for the New Form, but when I try and do the same thing on the Edit form it's not firing the event. I've tried creating seperate buttons for each form, or calling the NewSaveButton from the edit form, but neither way is working. I've tried creating rendering templates, and that's also not working.

Does anyone have any idea's as to what I might be missing

share|improve this question
up vote 1 down vote accepted

You can add a javascript function called PreSaveAction onto the pages the will override the Save action to allow you to run your own code. Once your code executes, you return true or false and the item is saved or canceled.

We don't have much to go on, so this might not satisfy your requirements, but it does answer your question.

share|improve this answer
I'm more of a c# developer than a javascript one so this didn't occur to me. I'll try this and see how I go. Thanks :) – Dean Jul 23 '12 at 22:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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