I have opened a custom form with following command:
client.interface.trigger( 'showModal', useTemplate('Title of the Modal', './views/modal.html') );
I would like to be able to close this form using a submit or cancel button. When the user successfully completes the form I want to close the window. I But other than the built-in ‘x’ I can’t find any way to close it.
I’ve looked thru the github samples and only one I found that comes close (iparams-json-omni-app in Omni-App Samples) has a “closePopup()” method but that must be a custom function because its not found. When I tried to run that sample its missing the openModal() method so looks like its an incomplete sample.
This is the contents of modal.html:
as mentioned above ‘closePopup()’ does not work.