To do it "clean" way, just attach data-control="save-map" data-handler="<?= $this->getEventHandler('onAddArea') ?>" to close button in app/admin/formwidgets/maparea/map_modal.php and add this.$el.on('click', '[data-control="save-map"]', $.proxy(this.onSubmitForm, this)) in MapArea.prototype.init function in app/admin/formwidgets/maparea/assets/js/maparea.js