I'm working on a custom list. Two DWP webparts the first one insert data(save button only but some fields are pre filled) and the other one shows the data(This has got edit and delete enabled) I'm of course using PresaveAction but as far as i know i can only have one on per page. Unfortunately when 'm on edit mode and try to save the PreSaveAction validation fires despite the fact all the fields are filled and pre filled.

So how can i disable PreSaveAction when the page is in EDIT mode.How to check when the other webpart is in EDIT mode. Thanks in Advance

2 Answers 2


To "effectively" disable PreSaveAction, create a new function called PreSaveAction and return false until you are happy that all the controls have the correct data in place, then return true in order to allow the post.


PreSave should always run when you are updating something on a SharePoint form what you need to do is make sure whatveer you are entering on the form through prepopulation is actually valid. You might need to actually save the data you are prepopulating to javascript variables and insert them in the preSave function directly when the function runs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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