Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

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.