Destroy

Forms Developer Guides Scripting Interface Modal

DESTROY()

var modal = Modal.new("Example Title!");
modal.destroy();

modal.visible() == false;
modal.title() == null;

Destroys the modal, removing it from the page entirely. References to the modal's object are considered invalid, and any update methods used will have no effect.