Page 1 of 1
Modal Edit forms
Posted: 04 Dec 2015
by Cloud.Ed
I have an edit form opened in modal and a button to create another new form from the same list in modal. When I save the 2nd (new) form it closes and the first edit form then updates and displays the list view. How can I save the new form and just end up at the first edit form?
Re: Modal Edit forms
Posted: 07 Dec 2015
by rostislav
You haven't mentioned how you are opening the modal dialogs, but generally if you want to control when the parent form is refreshed (or if it is refreshed at all) you should use the SP.UI.ModalDialog.showModalDialog(options) function.
For example,
Code: Select all
SP.UI.ModalDialog.showModalDialog({url: '/Lists/Custom/fd_Item_New.aspx'});
will open the new form in a way that when it is submitted the parent form will not be refreshed.
If needed, you can specify your own function for refreshing the parent form - it will be the dialogReturnValueCallback function, see the documentation:
https://msdn.microsoft.com/en-us/librar ... e.14).aspx
If you need more help, please provide your code and a screenshot will also be of help.
Re: Modal Edit forms
Posted: 07 Dec 2015
by Cloud.Ed
Perfect, thank you!