I need to open a modal dialog pop up box when i click a button on the edit form but at the same time i need to save the data on the edit form. Example: I have a SPList say Report. In the edit form of this List, I have a button, the onclick function of this button opens a modal dialog pop up, i need to save the list item before (or) during the time when modal dialog pop up opens up.

2 Answers 2


Yes it is possible. But when you save the form, page will postback and reload, meaning your pop up will go away.

Every asp button in sharepoint has a "hook" for javascript interception.

It is called "PreSaveItem()"

Just open your pop-up in that method and return true.

If you want to submit your form, you'll have to do it via javascript etc, to keep the page from reloading, and keeping your popup window open.


for opening a modal dialogue box you can make use of dialog widget from jQuery UI library.

I am sure there are multiple other samples in the internet in case you do not want to use jquery,

  • The issue is not with the modal dialog, its with saving list item info on the edit page prior to opening the modal dialog
    – Avinash
    Commented May 7, 2014 at 20:39

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.