Skip to main content

Does anyone know how to close the dialog box when creating a new event in a SharePoint calendar? Right now if I click cancel it shows the Forms Submitted Successfully message but does not close the window. I can get rid of the success message but I just want the window to close. Any thoughts on this one?15898iA8C6FAD427B76B34.png

Thanks,

Ben

Hi Ben,


 


I did a quick test and the small "x" in the right top corner does close the dialogbox (Tested on Chrome).


But i saw the same issue that you described, if you cancel the event it still shows the successful dialog box - which is wrong.


 


Looking at the rules behind the form there is a rule for the Cancel Button, this rules calles a "Navigate to URL" action, this can be edited to navigate back to the Calendar list.


The same for the "Create" button - you can create your own form with and change the "Navigate to URL" action to point to your own form.


This form can have buttons to navigate back to the Calendar list.


 


-Jean


 


Hi Jean,

 

Thanks for the help here. I attempted to do this but because the dialog box is consider a seperate window it will not close the window when I use the navigate option. I can get the dialog box to go to another page or even close the current page but it doesn't actually close the box. 


Hi bhickonk2,


 


I'm not sure if this is possible but you but you can try to inject a SharePoint javascript to close the dialog box. This appears to be a SharePoint PopUp dialog (ms-dlgContent) and it's being used to frame the K2 form on the calendar list.


SP.SOD.execute("sp.ui.dialog.js", "SP.UI.ModalDialog.commonModalDialogClose");

 


Reply