Submit Option

Forms Developer Guides Scripting Interface Menu

SUBMIT_OPTION(text, callback)

App.menu().submit_option("Save", function() {
    console.log("Save Option Clicked!");
});

Adds a submit option (with a check mark icon) to the right side of the menu bar. The callback is triggered when it's clicked.